﻿/* ============================================================
   DESIGN TOKENS (GLOBAL)
============================================================ */
:root {
    /* Brand Colors */
    --color-primary: #04AA6D;
    --color-primary-dark: #038a59;
    --color-accent: #f4c542;

    /* Neutral Palette */
    --color-bg: #f7f7f7;
    --color-surface: #ffffff;
    --color-border: #e0e0e0;
    --color-text: #222;
    --color-text-muted: #666;

    /* Status */
    --color-success: #2ecc71;
    --color-error: #e74c3c;
    --color-warning: #f1c40f;

    /* Typography */
    --font-family: "Inter", "Segoe UI", sans-serif;
    --font-size-sm: 0.85rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.6rem;

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    font-family: var(--font-family);
    color: var(--color-text);
}

/* ============================================================
   GLOBAL LAYOUT
============================================================ */
.container {
    max-width: 420px;
    margin: 0 auto;
    padding: var(--space-5) var(--space-3);
}

@media (min-width: 768px) {
    .container { max-width: 600px; }
}

/* ============================================================
   HEADER
============================================================ 
.header {
    text-align: center;
    padding: 20px 0;
}						*/

.header {
  text-align: center;
  background-color: #00bfff;
  border: 1px solid navy;
  padding-right:5px; 
  padding-left:5px;
  height:150px;
  text-shadow: 1px 1px 1px #000;
  border-radius: 10px;

}


.logo {
    width: 150px;
    height: auto;
}

.subtext {
    margin-top: 10px;
    font-size: 16px;
    color: #444;
}

/* ============================================================
   CARD SYSTEM
============================================================ */
.card {
    background: var(--color-surface);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   HYBRID BUTTON SYSTEM
============================================================ */

/* Base */
.btn,
.button-primary,
.button-secondary,
.button-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn:active,
.button-primary:active,
.button-secondary:active {
    transform: scale(0.98);
}

/* Primary */
.btn-primary,
.button-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover,
.button-primary:hover {
    background: var(--color-primary-dark);
}

/* Secondary */
.btn-secondary,
.button-secondary {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-secondary:hover,
.button-secondary:hover {
    background: var(--color-primary);
    color: white;
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
}

/* Link-style secondary */
.button-secondary-link {
    background: none;
    color: #555;
    text-decoration: none;
    margin-top: 12px;
}

.button-secondary-link:hover {
    color: #333;
}

/* ============================================================
   INPUT SYSTEM
============================================================ */
.input,
.input-field {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    margin-bottom: var(--space-4);
}

.input:focus,
.input-field:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(4,170,109,0.2);
}

.input-container {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-3);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px;
}

.icon { font-size: 22px; margin-right: 10px; }
.icon.red { color: red; }
.icon.blue { color: blue; }

/* ============================================================
   TITLES
============================================================ */
.title {
    font-size: 26px;
    color: gold;
    text-align: center;
    margin-bottom: 20px;
}

.lock-icon {
    font-size: 28px;
    color: green;
}

/* ============================================================
   CHAT UI
============================================================ */
.date-separator {
    text-align: center;
    margin: var(--space-4) 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.message-row {
    display: flex;
    margin-bottom: var(--space-3);
}

.message-row.self { justify-content: flex-end; }

.message-bubble {
    max-width: 75%;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: #f1f1f1;
    box-shadow: var(--shadow-sm);
}

.message-row.self .message-bubble {
    background: var(--color-primary);
    color: white;
}

.message-meta {
    margin-top: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.message-row.self .message-meta {
    color: rgba(255,255,255,0.8);
}

/* ============================================================
   CALL UI — LAYOUT
============================================================ */
/* Wide container for call UI and media browser */
.container-wide {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: var(--space-5) var(--space-4);
}

/* Desktop expansion */
@media (min-width: 900px) {
    .container-wide {
        max-width: 1800px;
    }
}

.call-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

@media (min-width: 900px) {
    .call-grid {
        display: grid;
        grid-template-columns: 240px 1fr 300px;
        gap: var(--space-4);
    }
}

/* ============================================================
   CALL STATUS BANNERS
============================================================ */
.call-status-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    max-width: 600px;
    width: 90%;
    text-align: center;
    pointer-events: none;
}

.call-ended-message,
.receiver-left-message,
.hang-up-message {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    font-weight: 600;
    color: #fff;
    box-shadow: var(--shadow-md);
    animation: fadeSlideUp 0.6s ease forwards;
}

.call-ended-message {
    background: linear-gradient(135deg, #4a90e2, #357ab8);
}

.receiver-left-message,
.hang-up-message {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   LIVE BADGE
============================================================ */
.live-badge {
    padding: 2px 6px;
    border-radius: 4px;
    background: red;
    color: white;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
}

.local-live {
    position: relative; /* remove absolute */
    top: 2px;
    left: 8px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex !important;
    width: auto !important;
    max-width: max-content !important;
    margin-right: 30px;
}

/* ============================================================
   PARTICIPANT TILE
============================================================ */
.participant-tile {
    background: #f0f7ff;
    border-radius: var(--radius-md);
    border: 2px solid #ffd700;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    min-width: 220px;
}

.participant-tile.local {
    border-color: #1a73e8;
}

.participant-tile video {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ============================================================
   INFO OVERLAY
============================================================ */
.info-overlay {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    z-index: 10;
    color: white;
    font-size: 13px;
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
    pointer-events: none;
}

.avatar-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    z-index: 6;
}

.remote-location {
    flex: 1 1 auto;
    min-width: 80px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icons i {
    margin-left: 6px;
    font-size: 14px;
}

.mic-on, .camera-on { color: green; }
.mic-off, .camera-off { color: red; }

/* ============================================================
   STATUS DOT
============================================================ */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #aaa;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.status-dot.connected {
    background-color: #00e676;
    box-shadow: 0 0 8px #00e676;
    animation: pulse-green 1.6s ease-in-out infinite;
}

.status-dot.connecting {
    background-color: #ffeb3b;
    box-shadow: 0 0 8px #ffeb3b;
}

.status-dot.failed {
    background-color: #ff5252;
    box-shadow: 0 0 8px #ff5252;
}

@keyframes pulse-green {
    0% { transform: scale(1); box-shadow: 0 0 8px #00e676; }
    50% { transform: scale(1.35); box-shadow: 0 0 14px #00e676; }
    100% { transform: scale(1); box-shadow: 0 0 8px #00e676; }
}

/* ============================================================
   VIDEO GRID
============================================================ */
.video-card {
    background: var(--color-surface);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
}

/* ============================================================
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-3);
}

   CALL CONTROLS
============================================================ */
.call-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.call-btn-control {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    cursor: pointer;
    border: none;
    color: white;
}

.call-start { background: var(--color-primary); }
.call-end   { background: var(--color-error); }
.call-hang  { background: var(--color-warning); }

/* ============================================================
   GLOW EFFECTS
============================================================ */
.initiator-glow {
    font-weight: bold;
    background: linear-gradient(90deg, #0066ff, #00ffcc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: #003344;
    text-shadow:
      0 0 5px rgba(0, 240, 255, 0.7),
      0 0 10px rgba(0, 255, 204, 0.7),
      0 0 20px rgba(0, 240, 255, 0.6);
    transition: text-shadow 0.4s ease, transform 0.4s ease;
}

.initiator-glow:hover {
    text-shadow:
      0 0 10px rgba(0, 100, 200, 1),
      0 0 20px rgba(0, 150, 255, 1),
      0 0 30px rgba(0, 200, 255, 0.9);
    transform: scale(1.05);
}

.receiver-glow {
    font-weight: bold;
    background: linear-gradient(90deg, #ffd700, #ff6f61);
    -webkit-background-clip: text;
    -webkit-text-fill-color: #003344;
    text-shadow:
      0 0 5px rgba(255, 215, 0, 0.7),
      0 0 10px rgba(255, 111, 97, 0.7),
      0 0 20px rgba(255, 215, 0, 0.6);
    transition: text-shadow 0.4s ease, transform 0.4s ease;
}

.receiver-glow:hover {
    text-shadow:
      0 0 10px rgba(255, 215, 0, 0.9),
      0 0 20px rgba(255, 111, 97, 0.9),
      0 0 30px rgba(255, 215, 0, 0.8);
    transform: scale(1.05);
}

.accept-animation {
    animation: flashGlow 0.6s ease forwards;
}

@keyframes flashGlow {
    0% {
        opacity: 1;
        transform: scale(1);
        text-shadow:
          0 0 5px rgba(0, 240, 255, 0.7),
          0 0 10px rgba(0, 255, 204, 0.7),
          0 0 20px rgba(0, 240, 255, 0.6);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        text-shadow:
          0 0 15px rgba(0, 240, 255, 1),
          0 0 30px rgba(0, 255, 204, 1),
          0 0 45px rgba(0, 240, 255, 0.9);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
        text-shadow: none;
    }
}

/* ============================================================
   MISC
============================================================ */
.center { text-align: center; }

.mbybtn-info {
	background-color:#000080  ;
	font-size: 1rem;
  color: #ffd700;
  text-align: center;
  font-weight: normal;
  padding: 0.5rem 0 0 0;
  margin: 0;
  text-shadow: 1px 1px 1px #000;
  border-radius: 10px;

	}
.action-tile {
    display: flex;
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.action-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-3);
    font-size: 24px;
    color: white;
}

.action-icon.photo { background: #ff9800; }
.action-icon.video { background: #d32f2f; }
.action-icon.gallery { background: #e91e63; }

.action-label {
    flex: 1;
    font-size: var(--font-size-md);
    font-weight: 600;
}

.action-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
}

.action-btn:hover {
    background: var(--color-primary-dark);
}
/* Link tiles (Profile, Logout) */
.link-tile {
    text-decoration: none;
    color: inherit;
}

/* Profile + Logout icon colors */
.action-icon.profile { background: #3f51b5; }
.action-icon.logout { background: #d32f2f; }

/* ============================================================
   CHAT PANEL
   ============================================================ */
.chat-card {
    background: var(--color-surface);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-title {
  flex: 1;
}

#messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: var(--space-3);
    border: 1px solid var(--color-border);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: #fafafa;
}

#messageInput {
    width: 100%;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-3);
}

/* AVATAR CIRCLE */
.chat-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-md);
}
/* STICKY HEADER */
.chat-header {
    position: sticky;
    top: 0;
    background: var(--color-surface);
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.title {
  color: grey;
  font-size: 18px;
}
.room-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.room-list {
  border: 1px solid #ddd;
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  background: #fafafa;
}

.room-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.15s ease;
}

.room-item:last-child {
  border-bottom: none;
}

.room-item:hover {
  background: #f0f7ff;
}

.room-item.selected {
  background: #dbeeff;
  border-left: 4px solid #1a73e8;
}

.room-title {
  font-weight: 600;
  font-size: 15px;
}

.room-meta {
  font-size: 13px;
  color: #666;
}

.join-btn {
  padding: 10px 16px;
  background: #1a73e8;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.join-btn:hover {
  background: #155fc0;
}
/* No Active Rooms Placeholder */
.no-rooms {
  text-align: center;
  padding: 40px 0;
  color: #666;
}

.no-rooms-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.no-rooms-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.no-rooms-sub {
  font-size: 14px;
  color: #888;
}

.room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.15s ease;
}

.room-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  font-size: 18px;
  font-weight: 600;
  color: #555;
}

.room-info {
  display: flex;
  flex-direction: column;
}
.room-item.selected .room-avatar,
.room-item:hover .room-avatar {
  border: 2px solid #1a73e8;
}
/* ============================================================
   LOCAL VIDEO TILE — MOVE OVERLAY TO TOP WITH LIVE BADGE
   ============================================================ */

/* Ensure the local tile can host a top overlay */
.local-tile {
    position: relative;
}


/* Local LIVE badge stays top-left (already working) */
.local-live {
        z-index: 30;
}

/* Move avatar + mic/cam icons to the TOP, inline with LIVE */
/* LOCAL TILE OVERLAY FIX — MIRROR REMOTE BEHAVIOR */
.local-tile .info-overlay {
    position: absolute;
    top: 4px;
    left: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    z-index: 20; /* overlay container */
}

/* Avatar + icons ABOVE overlay container */
.local-tile .avatar-circle,
.local-tile .icons {
    position: relative; /* required for z-index to apply */
    z-index: 25;
}

/* LIVE badge ABOVE avatar + icons 
.local-live {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 30;
}*/

/* Avatar circle sizing  left: 50px;*/
.local-tile .avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-right: 30px;
}

/* Mic/cam icons inline */
.local-tile .mic-icon,
.local-tile .cam-icon {
    font-size: 18px;
    color: green;
}

/* Ensure the tile has enough width to prevent wrapping */
.local-tile.participant-tile {
    min-width: 280px;
    min-height: 180px;
}
/*======================================================================
 MEDIA CSS 
======================================================================*/

.media-browser {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 10px;
}
.media-browser { 
	position: relative; 
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f2f2f2;
    cursor: pointer;
}

.media-browser .media-item img,
.media-browser .media-item video {
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.media-info {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 6px;
    background: rgba(0,0,0,0.55);
    color: white;
    font-size: 10px;
    display: flex;
    justify-content: space-between;
    z-index: 3; /* <-- higher than .media-meta */
}

.media-info-toggle {
    display: none;
}

@media (max-width: 480px) {
    .media-info-toggle {
        display: block !important;
    }
}
.media-info-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 20px;
    background: rgba(0,0,0,0.55);
    color: white;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s ease;
    z-index: 999999 !important;
    pointer-events: auto !important;
    -webkit-user-select: none;
    user-select: none;
}

.media-item .media-info-toggle {
    cursor: pointer;
}

.media-item {
    cursor: default;
}

.media-item img {
    cursor: pointer;
}

/*
.media-info-toggle:hover {
    opacity: 1;
}
.media-info-toggle {
    z-index: 9999;
    pointer-events: auto;
}
	*/

.media-item .type {
    font-weight: bold;
    opacity: 0.8;
}

.media-item.video::after {
    content: "▶";
    position: absolute;
    font-size: 32px;
    color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
}
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#lightbox-img,
#lightbox-video {
    transition: opacity 0.25s ease;
}

.hidden {
    opacity: 0;
    display: none !important;
}


.lightbox.hidden {
    display: none;
}
/* Lightbox container */
#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Hidden state */
#lightbox.hidden {
    display: none;
}

/* Close button */
#lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

/* Content wrapper */
.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Actual media inside the lightbox */
.lightbox-content img,
.lightbox-content video {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    object-position: center;
    display: block;
}
/*
.lightbox-content img,
.lightbox-content video {
    max-width: 65%;
    max-height: 65%;
    object-fit: contain;
    object-position:  center ; center; top center;
}	*/

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.media-item .duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 4px;
    font-size: 8px;
    border-radius: 4px;
}
/* Ensure thumbnails clip absolutely-positioned children */
.media-item {
    position: relative;
    overflow: hidden;
}

/* Metadata overlay */
.media-meta {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    font-size: 12px;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Thumbnail media */
.media-item img,
.media-item video {
    position: relative;
    z-index: 1;
}

/* Desktop hover */
.media-item:hover .media-meta {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Info bar (always visible) */
.media-info {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 6px;
    background: rgba(0,0,0,0.55);
    color: white;
    font-size: 10px;
    display: flex;
    justify-content: space-between;
    z-index: 3; /* ABOVE metadata */
}

@keyframes slideUpMeta {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Mobile bottom-bar metadata */
@media (max-width: 480px) {
    .media-meta {
        top: auto !important;
        bottom: 0 !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;

        padding: 6px;
        background: rgba(0,0,0,0.55);
        opacity: 0;
        visibility: hidden;
        z-index: 2;
        pointer-events: none;

        transform: translateY(100%);
    }

    .media-item.show-meta .media-meta {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        animation: slideUpMeta 0.25s ease forwards;
        transform: translateY(0);
    }
     /*
    .media-info {
        position: relative;
        bottom: auto;
        width: 100%;
        padding: 6px 0;
        background: none;
        z-index: 3;
    } */
}

.media-filters {
    margin: 10px 0;
    display: flex;
    gap: 10px;
}

.filter-btn{
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #eee;
    border-radius: 4px;
    cursor: pointer;
}


.filter-btn.photo {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #e91640;
    border-radius: 4px;
    cursor: pointer;
    color: white;

}

.filter-btn.video {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #ffa500;
    border-radius: 4px;
    cursor: pointer;
    color: white;

}

.filter-btn.active {
    background: #0078d4;
    color: white;
}

.map-link {
    color: #4da3ff;
    text-decoration: underline;
    font-size: 12px;
    
}
.media-browser {
    position: relative; /* ensures absolute children anchor correctly */
}

/* Help button anchored bottom-right INSIDE the media browser */
.help-button {
    position: fixed;
    bottom: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    background: rgba(0,0,0,0.65);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 9999; /* stays above grid, below lightbox */
    pointer-events: auto;
    backdrop-filter: blur(4px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.help-button:hover {
    background: rgba(0,0,0,0.85);
    transform: scale(1.05);
}

/* Pulse animation */
@keyframes helpPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.help-button.pulse {
    animation: helpPulse 0.9s ease-in-out 3;
}
.help-tooltip {
    position: fixed;
    bottom: 64px;
    right: 14px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.help-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}


/* Full-screen overlay */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Visible state */
.help-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Help panel */
.help-panel {
    background: rgba(20,20,20,0.95);
    color: white;
    padding: 24px;
    border-radius: 16px 16px 0 0;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
    animation: slideUpDrawer 0.35s ease;
}

@keyframes slideUpDrawer {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.help-panel h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
    text-align: center;
}

.help-section h3 {
    margin-bottom: 8px;
    font-size: 16px;
}

.help-section ul {
    margin: 0 0 16px 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.help-close-btn {
    width: 100%;
    padding: 10px;
    background: #444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
}

.help-close-btn:hover {
    background: #555;
}

/* Auto-hide desktop or mobile sections */
@media (min-width: 481px) {
    .mobile-section { display: none; }
}

@media (max-width: 480px) {
    .desktop-section { display: none; }
}

.pagination-wrapper {
    text-align: center;
    margin-top: 20px;
}

.pagination-info {
    margin-bottom: 8px;
    background: var(--color-primary);
    color: white;
    opacity: 0.8;
    border-radius: 10px;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.pagination-controls a,
.pagination-controls span {
    padding: 4px 8px;
}

.pagination-controls .disabled {
    opacity: 0.4;
    cursor: default;
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-numbers a.active {
    background: #0078d4;
    color: white;
    border-radius: 4px;
    font-weight: bold;
}

.rows-form,
.jump-form {
    margin-top: 6px;
}

.jump-form input {
    width: 60px;
    text-align: center;
}
/* Base desktop/tablet styles (already working) */
.pagination-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.page-btn {
    display: inline-block;
    padding: 6px 12px;
    background: #f2f2f2;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333 ; /*!important;*/
    font-size: 14px;
}

.page-btn.active {
    background: #0078d4;
    color: #fff !important ;/**/ 
    border-color: #0078d4;
    font-weight: bold;
}

.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ----------------------------- */
/* 📱 Compact Mobile Layout      */
/* ----------------------------- */
@media (max-width: 480px) {

    /* Reduce padding and font size */
    .page-btn {
        padding: 4px 8px;
        font-size: 12px;
        margin: 0 2px;
    }

    /* Hide FIRST and LAST on small screens */
    .page-btn.first,
    .page-btn.last {
        display: none;
    }

    /* Reduce gap between items */
    .pagination-controls {
        gap: 4px;
    }

    /* Make dots smaller */
    .dots {
        font-size: 12px;
        padding: 0 4px;
    }

    /* Center everything tightly */
    .pagination-wrapper {
        text-align: center;
    }

    /* Jump + Rows forms stack vertically */
    .rows-form,
    .jump-form {
        margin-top: 8px;
    }

    .rows-form select,
    .jump-form input {
        font-size: 12px;
        padding: 4px;
    }

    .jump-form button {
        padding: 4px 8px;
        font-size: 12px;
    }
}

.page-btn,
.page-btn:visited {
    color: #333 ;/*!important*/
}

#loadMoreBtn{
  padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    cursor: pointer;
    border: none;
    color: white;
    }
    
.more-media { background: var(--color-primary); }    
    
.appinfo            {
    font-size: 20px;
    text-align: center;
    background-color: #2196F3 ;
    border: 1px solid #ffd700;
    cursor: pointer;
    color: #ffffff;
    margin-top: 0px;
   }
.appbtn {
  display: inline-block;
  padding: 10px 15px;
  font-size: 24px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  outline: none;
  color: #ffffff;
  background: #2196F3; /*#e7f1ff; #fff;#4CAF50; color: #fff; */
  border: 2px solid #ffd700;
  border-radius: 15px;
  box-shadow: 0 9px #999;
}
#progressBarContainer {
    position: fixed;
    top: 152px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.15);
    z-index: 9999;
}
#progressBarsContainer {
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.15);
    z-index: 9999;
}

#progressBar {
    height: 100%;
    width: 0%;
    background: #4caf50;
    transition: width 0.25s ease-out;
}

.call-health-panel {
  /*position: absolute;top: 10px;*/
  left: 10px;
  width: 100%;
  background: rgba(0,0,0);
  color: #0f0;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  backdrop-filter: blur(6px);
}

.call-health-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.call-health-row span {
  opacity: 0.9;
}
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    color: white;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 10001;
}

.nav-arrow:hover {
    opacity: 1;
}

.nav-left {
    left: 10px;
}

.nav-right {
    right: 10px;
}

/* Make arrows bigger on mobile */
@media (max-width: 600px) {
    .nav-arrow {
        font-size: 60px;
        padding: 30px;
    }
}

.lightbox-toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10002;
}

.tb-btn {
    background: rgba(0,0,0,0.6);
    border: none;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tb-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .tb-btn {
        font-size: 28px;
        padding: 18px 22px;
    }
}
.nav-index {
    font-size: 18px;
    color: white;
    margin: 0 8px;
    opacity: 0.8;
    pointer-events: none;
}

.nav-left-index {
    margin-left: 10px;
}

.nav-right-index {
    margin-right: 10px;
}
/* ALBUMS */

.album-list {
    padding: 16px;
}

.country-title {
    margin: 24px 0 12px;
    font-size: 22px;
    font-weight: 600;
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.city-tile {
    text-decoration: none;
    color: inherit;
}

.city-thumb {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background:#222;/*background:#f2f2f2;padding-top: 70%;*/
}

.city-thumb vid ,
.city-thumb img {
    /*position: absolute;*/
    top: 0; left: 0;
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: top center;
}

.gps-pin {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 12px;
}

.city-info {
    margin-top: 6px;
}

.city-name {
    font-size: 16px;
    font-weight: 500;
}

.city-count {
    font-size: 13px;
    opacity: 0.7;
}

#city-map {
    width: 100%;
    height: 260px;
    border-radius: 12px;
    margin: 20px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.highlight-thumb {
    outline: 4px solid #ffcc00;
    transition: outline 0.3s ease;
}
.media-item.highlight-thumb {
    outline: 4px solid #ffcc00;
    transition: outline 0.3s ease;
}
/*
#city-map,
.leaflet-container {
    z-index: 1 !important;
}

.media-item,
.media-info-toggle {
    position: relative;
    z-index: 10;
}

.media-browser {
    pointer-events: auto;
}
#city-map {
    flex-shrink: 0;
}
.media-item,
.media-info-toggle {
    position: relative; 
    z-index: 10;
}   
	
	*/
#city-map {
    pointer-events: auto;
}

				 
.leaflet-container {
  touch-action: auto !important; /*touch-action: none;*/
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0); /*transparent; Removes iOS gray tap flash */
}
		
		
/* Lower Leaflet's stacking so it never blocks taps */
#city-map,
#city-map .leaflet-container,
#city-map .leaflet-pane,
#city-map .leaflet-map-pane,
#city-map .leaflet-overlay-pane,
#city-map .leaflet-marker-pane,
#city-map .leaflet-tile-pane {
    z-index: 1 !important;
}

/* Raise your media items above the map */
.alerts-msg {
  /*position: absolute;top: 10px;*/
  left: 10px;
  width: 100%;
  background: rgba(255,0,0);
  color: #ffF;
  padding: 12px;
  border-radius: 8px;
  font-size: 18px;
  backdrop-filter: blur(6px);
}
.success {background-color:#04AA6D ; color: white;} /* Green */
.success:hover {background-color: #46a049;}

.info {background-color: #2196F3; color: white;} /* Blue */
.info:hover {background: #0b7dda;}

.warning {background-color: #ff9800; color: white;} /* Orange */
.warning:hover {background: #e68a00;}

.danger {background-color: #f44336; color: white;} /* Red */ 
.danger:hover {background: #da190b;}

.default {background-color: #e7e7e7; color: black;} /* Gray */ 
.default:hover {background: #ddd;}

.success, .info, .warning, .danger, .default {
    cursor: pointer;
}

/* Tap (touch) behavior */
.success:active { background-color: #46a049; }
.info:active { background-color: #0b7dda; }
.warning:active { background-color: #e68a00; }
.danger:active { background-color: #da190b; }
.default:active { background-color: #ddd; }

/*
.media-info-toggle {
    position: absolute;
    z-index: 999999 !important;    must exceed Leaflet panes 
    pointer-events: auto !important;
    -webkit-user-select: none;    /* prevents iOS “Lookup” popup  
    user-select: none;
}
*/
.media-item {
    position: relative;
    z-index: 10;
}

.media-info-toggle {
    z-index: 999999 !important;
}
.media-info-toggle {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/*presenceStatus
--------------------------------------------*/
.presenceStatus.online {
    background-color: #00e676;
    box-shadow: 0 0 8px #00e676;
    animation: pulse-green-online 1.6s ease-in-out infinite;
    }

@keyframes pulse-green-online {
    0% { transform: scale(1); box-shadow: 0 0 8px #00e676; }
    50% { transform: scale(1.35); box-shadow: 0 0 14px #00e676; }
    100% { transform: scale(1); box-shadow: 0 0 8px #00e676; }
}

/* Badge styling */
#callBadge {
  background: red;
  color: white;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: bold;
}

/* Toast styling */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 9999;
  animation: fadeIn 0.5s;
}

.toast button {
  margin-top: 8px;
  background: #4CAF50;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.toast button:hover {
  background: #45a049;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.floating-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(30, 30, 30, 0.85);
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    gap: 12px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
#floatingNotifications {
    position: fixed;
    top: calc(150px + 20px);
    right: 50px;
    width: 300px;
    z-index: 9999;
}

#floatingNotifications .card,
#ogcnotification,
#incomingCallModal {
    margin-bottom: 12px;
}
.call-header {
    text-align: center;
    margin-bottom: 10px;
}
.call-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* above floating controls & notifications */
}

.call-modal .modal-content {
    background: #fff;
    padding: 20px 28px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 1.1em;
}
/* Container */
#userList {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Group headers */
.group-header {
    background: #f5f5f5;
    font-weight: bold;
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
    color: #333;
    text-transform: uppercase;
    font-size: 0.9em;
}

/* User rows */
#userList li {
    display: grid;
    grid-template-columns: 40px 1fr 1fr 150px 40px;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.95em;
}

#userList li:last-child {
    border-bottom: none;
}

/* Presence icons */
.presence {
    font-size: 1.2em;
    text-align: center;
}

/* Name + screenname */
.name {
    font-weight: 600;
    color: #222;
}

.screenname {
    color: #555;
    font-style: italic;
}

/* Last seen */
.lastseen {
    font-size: 0.85em;
    color: #777;
    text-align: right;
}

/* Checkbox */
#userList input[type=checkbox] {
    transform: scale(1.2);
    cursor: pointer;
}
/* Fade + slide in */
.user-move {
  transition: all 0.4s ease;
}

.user-hidden {
  opacity: 0;
  transform: translateX(-20px);
}

.user-visible {
  opacity: 1;
  transform: translateX(0);
}
/* Badge styling */
#callBadge {
  background: red;
  color: white;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: bold;
}

/* Toast styling */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 9999;
  animation: fadeIn 0.5s;
}

.toast .btn {
  margin-top: 8px;
  margin-right: 6px;
  background: #4CAF50;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.toast .btn:hover {
  background: #45a049;
}

.toast .btn-secondary {
  background: #777;
}

.toast .btn-secondary:hover {
  background: #555;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
#city-local-time {
		background-color:navy;
	width: 300px;  
	text-align: center;
	color:gold ;
	border: 3px solid dodgerblue;
	font-size:20px;
	text-shadow: 1px 1px 1px #000;
    border-radius: 10px;
}
