@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* Training.css color system */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --dark-gradient: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glow-primary: 0 0 40px rgba(102, 126, 234, 0.4);
    --glow-success: 0 0 30px rgba(56, 239, 125, 0.5);
    
    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* Accent colors */
    --accent-coral: #f5576c;
    --accent-mint: #38ef7d;
    --accent-lavender: #667eea;
    --accent-cyan: #22d3ee;
    --accent-blue: #3b82f6;
    
    /* Badge colors - from training.css */
    --badge-video: linear-gradient(135deg, #f5576c, #f093fb);
    --badge-pdf: linear-gradient(135deg, #667eea, #764ba2);
    --badge-interactive: linear-gradient(135deg, #11998e, #38ef7d);
    
    /* Background colors */
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.12);
    
    /* Sizing */
    --safe-area-bottom: env(safe-area-inset-bottom, 20px);
    --card-height: 72px;
    --control-bar-height: 80px;
    --footer-nav-height: 68px;
    --search-height: 56px;
    
    /* Effects */
    --blur-strong: blur(20px);
    --blur-light: blur(10px);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 12px;
    --border-radius-md: 20px;
    --border-radius-lg: 28px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Main Container */
.mobile-training-container {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg-primary);
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header - No blur, solid background */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 16px 16px;
    padding-top: max(24px, calc(env(safe-area-inset-top) + 12px));
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

/* Back Navigation */
.mobile-back-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px 10px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    overflow: hidden;
}

.mobile-back-btn:hover,
.mobile-back-btn:active {
    background: rgba(34, 211, 238, 0.1);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}

.mobile-back-btn:active {
    transform: scale(0.96);
}

.mobile-back-arrow {
    width: 20px;
    height: 20px;
    min-width: 20px;
    max-width: 20px;
    min-height: 20px;
    max-height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.mobile-back-btn:hover .mobile-back-arrow,
.mobile-back-btn:active .mobile-back-arrow {
    transform: translateX(-3px);
}

.mobile-back-text {
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search Bar - Using training.css styles */
.mobile-search-container {
    position: relative;
    padding: 8px 0;
}

.mobile-search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 48px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    outline: none;
    transition: var(--transition-smooth);
}

.mobile-search-input::placeholder {
    color: var(--text-muted);
}

.mobile-search-input:focus {
    border-color: var(--accent-lavender);
    box-shadow: var(--glow-primary);
}

.mobile-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Cards List Container */
.mobile-cards-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 8px;
    padding-bottom: calc(var(--control-bar-height) + var(--footer-nav-height) + var(--safe-area-bottom) + 32px);
    -webkit-overflow-scrolling: touch;
    background: var(--bg-primary);
}

.mobile-cards-list {
    display: flex;
    flex-direction: column;
    padding-bottom: 16px;
}

/* Individual Card - iOS Recent Calls Style with training.css colors */
.mobile-training-card {
    display: flex;
    align-items: center;
    min-height: var(--card-height);
    padding: 12px 16px;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: -1px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.mobile-training-card:active {
    background: rgba(255, 255, 255, 0.12);
}

/* Card Badge - Using training.css gradients */
.mobile-card-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-right: 12px;
    color: var(--text-primary);
}

.mobile-card-badge.video {
    background: var(--badge-video);
}

.mobile-card-badge.pdf {
    background: var(--badge-pdf);
}

.mobile-card-badge.interactive {
    background: var(--badge-interactive);
}

/* Card Content - White text */
.mobile-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-card-title {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.mobile-card-site {
    font-size: 15px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-card-description {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Card Arrow */
.mobile-card-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 8px;
}

/* Control Bar - Fixed above FooterNav */
.mobile-control-bar {
    position: fixed;
    bottom: var(--footer-nav-height);
    left: 0;
    right: 0;
    height: var(--control-bar-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-left: 16px;
    padding-right: 16px;
    z-index: 9998;
}

/* Control Button - Using training.css styles */
.mobile-control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 20px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    min-width: 90px;
}

.mobile-control-btn:active {
    transform: scale(0.95);
}

.mobile-control-btn.selected {
    background: rgba(56, 239, 125, 0.15);
    border-color: var(--accent-mint);
    box-shadow: var(--glow-success);
}

.mobile-control-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.mobile-control-btn.selected .mobile-control-icon {
    color: var(--accent-mint);
}

.mobile-control-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: var(--transition-smooth);
}

.mobile-control-btn.selected .mobile-control-label {
    color: var(--accent-mint);
}

/* Video button selected state */
.mobile-control-btn.video-selected {
    background: rgba(245, 87, 108, 0.15);
    border-color: var(--accent-coral);
}

.mobile-control-btn.video-selected .mobile-control-icon,
.mobile-control-btn.video-selected .mobile-control-label {
    color: var(--accent-coral);
}

/* PDF button selected state */
.mobile-control-btn.pdf-selected {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--accent-lavender);
    box-shadow: var(--glow-primary);
}

.mobile-control-btn.pdf-selected .mobile-control-icon,
.mobile-control-btn.pdf-selected .mobile-control-label {
    color: var(--accent-lavender);
}

/* Interactive button selected state */
.mobile-control-btn.interactive-selected {
    background: rgba(56, 239, 125, 0.15);
    border-color: var(--accent-mint);
    box-shadow: var(--glow-success);
}

.mobile-control-btn.interactive-selected .mobile-control-icon,
.mobile-control-btn.interactive-selected .mobile-control-label {
    color: var(--accent-mint);
}

/* Modal Overlay - Blur effect ONLY when viewing modal is open */
.mobile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.25s ease-out;
    padding-bottom: calc(var(--footer-nav-height, 68px) + 32px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Content - Slide up from bottom */
.mobile-modal-content {
    width: 100%;
    max-height: 90vh;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    overflow: hidden;
    animation: slideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Modal Handle */
.mobile-modal-handle {
    width: 100%;
    padding: 8px 0;
    display: flex;
    justify-content: center;
}

.mobile-modal-handle::after {
    content: '';
    width: 36px;
    height: 5px;
    background: var(--glass-border);
    border-radius: 3px;
}

/* Modal Header */
.mobile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.mobile-modal-title-group {
    flex: 1;
    min-width: 0;
}

.mobile-modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Close button - Same as training.css modal-close */
.mobile-modal-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 12px;
    transition: var(--transition-smooth);
}

.mobile-modal-close:hover,
.mobile-modal-close:active {
    background: rgba(245, 87, 108, 0.2);
    border-color: var(--accent-coral);
    color: var(--accent-coral);
}

/* Modal Body */
.mobile-modal-body {
    padding: 0;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Video Container */
.mobile-video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin: 16px;
    margin-bottom: 0;
    width: calc(100% - 32px);
}

.mobile-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* PDF Container */
.mobile-pdf-container {
    width: 100%;
    height: 70vh;
    background: var(--glass-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin: 16px;
    width: calc(100% - 32px);
}

/* Interactive Container */
.mobile-interactive-container {
    width: 100%;
    height: 70vh;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin: 16px;
    width: calc(100% - 32px);
}

.mobile-interactive-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    border-radius: var(--border-radius-md);
}

/* Modal Description */
.mobile-modal-description {
    padding: 16px 20px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    border-top: 1px solid var(--glass-border);
}

/* Empty State */
.mobile-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.mobile-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.mobile-empty-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.mobile-empty-description {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 280px;
    line-height: 1.4;
}

/* Loading State */
.mobile-loading-state,
.fr-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 32px;
    gap: 16px;
    width: 100%;
    text-align: center;
}

.mobile-spinner,
.fr-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-lavender);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mobile-loading-text,
.fr-loading-text {
    font-size: 15px;
    color: var(--text-secondary);
    text-align: center;
}

@keyframes toastPop {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Error State */
.mobile-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
    text-align: center;
}

.mobile-retry-btn {
    margin-top: 20px;
    padding: 16px 32px;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8) 0%, rgba(17, 24, 39, 0.8) 100%);
    border: 1px solid var(--accent-cyan);
    border-radius: 50px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.mobile-retry-btn:active {
    transform: scale(0.96);
    box-shadow: var(--glow-primary);
}

/* Section Header */
.mobile-section-header {
    padding: 24px 16px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-primary);
}

/* Scrollbar styling for webkit */
.mobile-cards-container::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* Prevent overscroll bounce on iOS */
.mobile-training-container {
    overscroll-behavior: none;
}

/* Safe area padding for notched devices */
@supports (padding: max(0px)) {
    .mobile-header {
        padding-top: max(12px, env(safe-area-inset-top));
    }
}


/* ═══════════════════════════════════════════════════════════════
   SECTION: FilterTemplate integration classes
   ═══════════════════════════════════════════════════════════════ */

/* Results Bar */
.fr-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  margin: 0 16px 8px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 12px;
}

.fr-results-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fr-results-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.fr-results-count {
  font-size: 0.8rem;
  color: #22d3ee;
  font-weight: 500;
}

.fr-results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fr-results-search {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

/* Search Bar (SearchInput shared component) */
.fr-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.fr-search-bar:focus-within {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.fr-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0 12px;
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.fr-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 12px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  color: #ffffff;
}

.fr-search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.fr-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.fr-search-clear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}


/* ═══════════════════════════════════════════════════════════════
   SECTION: Chips, editing, forms, toggle
   ═══════════════════════════════════════════════════════════════ */

/* ── Filter Chips ── */
.mobile-chips-bar {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-chips-bar::-webkit-scrollbar {
  display: none;
}

.mobile-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-chip:active {
  transform: scale(0.95);
}

.mobile-chip-active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.4);
}

.mobile-chip-clear {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.mobile-chip-clear:active {
  background: rgba(239, 68, 68, 0.2);
}


/* ── Edit Mode Toggle ── */
.mobile-edit-toggle-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  margin: 0 16px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.mobile-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mobile-mode-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.3s ease;
}

.mobile-mode-label.active {
  color: #22d3ee;
  font-weight: 600;
}

.mobile-toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.mobile-toggle-switch.production {
  background: rgba(255, 255, 255, 0.15);
}

.mobile-toggle-switch.production::after {
  transform: translateX(20px);
}


/* ── Add Buttons (edit mode) ── */
.mobile-add-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.mobile-add-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(34, 211, 238, 0.1);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-add-btn:active {
  background: rgba(34, 211, 238, 0.2);
  transform: scale(0.96);
}


/* ── Card Edit Actions ── */
.mobile-card-edit-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 8px;
}

.mobile-edit-btn,
.mobile-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-edit-btn {
  background: rgba(59, 130, 246, 0.12);
}

.mobile-edit-btn:active {
  background: rgba(59, 130, 246, 0.25);
  transform: scale(0.92);
}

.mobile-delete-btn {
  background: rgba(239, 68, 68, 0.12);
}

.mobile-delete-btn:active {
  background: rgba(239, 68, 68, 0.25);
  transform: scale(0.92);
}


/* ── Add/Edit Form (inside modal) ── */
.mobile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.mobile-form-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.mobile-form-input:focus {
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-form-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

.mobile-btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-btn-secondary:active {
  background: rgba(255, 255, 255, 0.14);
}

.mobile-btn-primary {
  background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.3);
}

.mobile-btn-primary:active {
  transform: scale(0.98);
}

.mobile-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ── Site Suggestions Dropdown ── */
.mobile-site-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 150px;
  overflow-y: auto;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.mobile-site-suggestions li {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
}

.mobile-site-suggestions li:last-child {
  border-bottom: none;
}

.mobile-site-suggestions li:active {
  background: rgba(34, 211, 238, 0.12);
}


/* ── Site Toast (inline feedback) ── */
.mobile-site-toast {
  position: absolute;
  left: 0;
  right: 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.3s ease;
  z-index: 1001;
  color: white;
}

.mobile-site-toast-success {
  top: -8px;
  background: #10b981;
}

.mobile-site-toast-info {
  top: 100%;
  margin-top: 4px;
  background: #3b82f6;
}

.mobile-site-toast-warn {
  top: 100%;
  margin-top: 4px;
  background: #f59e0b;
}


/* ═══════════════════════════════════════════════════════════════
   SECTION: Form Modal — top-aligned overlay
   
   The form modal sits near the top of the screen with room
   to scroll, instead of being pushed to the bottom behind
   the footer nav.
   ═══════════════════════════════════════════════════════════════ */

.mobile-form-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: var(--blur-strong);
  -webkit-backdrop-filter: var(--blur-strong);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.25s ease-out;
  padding-top: max(24px, env(safe-area-inset-top, 24px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-form-modal-overlay .mobile-modal-content {
  border-radius: var(--border-radius-lg);
  margin: 0 12px;
  max-height: none;
  width: calc(100% - 24px);
  max-width: 500px;
  margin-bottom: 40px;
  animation: formSlideDown 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.mobile-form-modal-overlay .mobile-modal-body {
  padding: 20px;
  max-height: none;
  overflow-y: visible;
}

@keyframes formSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}