/**
 * aquarium_theme.css — High-Contrast Self-Contained Styles for Smart Aquarium Kit
 * Innovation Edge Solutions (combined_web_v7)
 * Guarantees visual contrast and prevents PurgeCSS missing utility issues.
 */

/* ==========================================================================
   Cyan Color Palette Utilities
   ========================================================================== */
.bg-cyan-50   { background-color: #ecfeff !important; }
.bg-cyan-100  { background-color: #cffafe !important; }
.bg-cyan-200  { background-color: #a5f3fc !important; }
.bg-cyan-500  { background-color: #06b6d4 !important; }
.bg-cyan-600  { background-color: #0891b2 !important; }
.bg-cyan-700  { background-color: #0e7490 !important; }
.bg-cyan-800  { background-color: #155e75 !important; }
.bg-cyan-900  { background-color: #164e63 !important; }
.bg-cyan-950  { background-color: #083344 !important; }

.hover\:bg-cyan-700:hover { background-color: #0e7490 !important; }
.hover\:bg-cyan-800:hover { background-color: #155e75 !important; }

.text-cyan-500 { color: #06b6d4 !important; }
.text-cyan-600 { color: #0891b2 !important; }
.text-cyan-700 { color: #0e7490 !important; }
.text-cyan-800 { color: #155e75 !important; }
.text-cyan-900 { color: #164e63 !important; }
.text-cyan-950 { color: #083344 !important; }

.border-cyan-200 { border-color: #a5f3fc !important; }
.border-cyan-300 { border-color: #67e8f9 !important; }
.border-cyan-500 { border-color: #06b6d4 !important; }
.border-cyan-600 { border-color: #0891b2 !important; }

/* Alpha / Opacity Backgrounds */
.bg-cyan-50\/50 { background-color: rgba(236, 254, 255, 0.5) !important; }
.bg-cyan-50\/70 { background-color: rgba(236, 254, 255, 0.7) !important; }
.bg-black\/20   { background-color: rgba(0, 0, 0, 0.2) !important; }
.bg-white\/10   { background-color: rgba(255, 255, 255, 0.1) !important; }
.bg-white\/20   { background-color: rgba(255, 255, 255, 0.2) !important; }

/* Gradient Utilities */
.bg-gradient-to-r.from-cyan-600.to-teal-600 {
    background: linear-gradient(135deg, #0891b2 0%, #0d9488 100%) !important;
}
.bg-gradient-to-r.from-cyan-600.to-blue-600 {
    background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%) !important;
}
.hover\:from-cyan-700:hover {
    background: linear-gradient(135deg, #0e7490 0%, #0f766e 100%) !important;
}

/* Purple Admin Utilities */
.bg-purple-700 { background-color: #7e22ce !important; }
.hover\:bg-purple-800:hover { background-color: #6b21a8 !important; }

/* ==========================================================================
   Primary Interactive Components
   ========================================================================== */

/* Feed Now Button */
#btn-feed-now,
.btn-feed-primary {
    background: linear-gradient(135deg, #0891b2 0%, #0d9488 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    border-radius: 16px !important;
    padding: 14px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.4) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.01em !important;
}
#btn-feed-now:hover,
.btn-feed-primary:hover {
    background: linear-gradient(135deg, #0e7490 0%, #0f766e 100%) !important;
    box-shadow: 0 6px 18px rgba(8, 145, 178, 0.5) !important;
    transform: translateY(-1px) !important;
}
#btn-feed-now:active,
.btn-feed-primary:active {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.3) !important;
}
#btn-feed-now span,
.btn-feed-primary span {
    color: #ffffff !important;
    font-weight: 800 !important;
}

/* Add Schedule Button */
.btn-add-schedule {
    background: #0891b2 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.35) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
}
.btn-add-schedule:hover {
    background: #0e7490 !important;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.45) !important;
    transform: translateY(-1px) !important;
}
.btn-add-schedule span {
    color: #ffffff !important;
}

/* Save Schedule Button */
.btn-save-schedule {
    background: #0891b2 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    padding: 8px 18px !important;
    border-radius: 12px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.35) !important;
    transition: all 0.2s ease !important;
}
.btn-save-schedule:hover {
    background: #0e7490 !important;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.45) !important;
}

/* Food Selection Tabs */
.food-tab-active {
    border: 2px solid #0891b2 !important;
    background: #ecfeff !important;
    color: #164e63 !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.15) !important;
    cursor: pointer !important;
}
.food-tab-inactive {
    border: 2px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #475569 !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}
.food-tab-inactive:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
}

/* Stepper Buttons */
.feed-stepper-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.15s ease !important;
}
.feed-stepper-btn:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

/* Height Utility */
.h-60 { height: 15rem !important; }

/* ==========================================================================
   Tactile Animated Toggle Switches (PurgeCSS Immune)
   ========================================================================== */
.aqua-switch {
    position: relative;
    display: inline-block;
    width: 62px;
    height: 34px;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}
.aqua-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.aqua-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    border: 2px solid #94a3b8;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9999px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}
.aqua-switch-slider::before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    top: 3px;
    background-color: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.aqua-switch:hover .aqua-switch-slider {
    border-color: #64748b;
}

/* Vacation Mode Active: Warm Amber Gold with Glow */
.aqua-switch input:checked + .aqua-switch-slider.vacation {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border-color: #b45309 !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45) !important;
}
.aqua-switch input:checked + .aqua-switch-slider.vacation::before {
    transform: translateX(28px);
    background-color: #fffbeb;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.4);
}

/* Cyan Active (For General Relays & Schedulers) */
.aqua-switch input:checked + .aqua-switch-slider.cyan {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
    border-color: #155e75 !important;
    box-shadow: 0 0 12px rgba(8, 145, 178, 0.4) !important;
}
.aqua-switch input:checked + .aqua-switch-slider.cyan::before {
    transform: translateX(28px);
    background-color: #ffffff;
}

/* Compact Table Switch (for Schedules Table) */
.aqua-switch-sm {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}
.aqua-switch-sm input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.aqua-switch-slider-sm {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    border: 1.5px solid #94a3b8;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9999px;
}
.aqua-switch-slider-sm::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    top: 2.5px;
    background-color: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.aqua-switch-sm input:checked + .aqua-switch-slider-sm {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
    border-color: #0e7490 !important;
}
.aqua-switch-sm input:checked + .aqua-switch-slider-sm::before {
    transform: translateX(20px);
}

/* ==========================================================================
   Mobile PWA Action Dock & App Shell Optimizations
   ========================================================================== */
.pwa-install-banner {
    background: linear-gradient(135deg, #0f172a 0%, #083344 100%);
    border: 1px solid #164e63;
    border-radius: 18px;
    padding: 12px 18px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-pwa-install {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    padding: 8px 16px !important;
    border-radius: 10px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4) !important;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .aquarium-mobile-content {
        padding-bottom: 84px !important; /* clearance for floating mobile dock */
    }
    .mobile-pwa-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 0 8px;
        z-index: 999;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
    }
    .mobile-dock-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: #94a3b8;
        font-size: 10px;
        font-weight: 700;
        text-decoration: none;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 6px 10px;
        border-radius: 10px;
        transition: all 0.15s ease;
    }
    .mobile-dock-btn:active {
        transform: scale(0.92);
        color: #38bdf8;
    }
    .mobile-dock-btn span.icon {
        font-size: 18px;
        line-height: 1;
    }
    .mobile-dock-btn.highlight {
        color: #38bdf8;
    }
}
@media (min-width: 769px) {
    .mobile-pwa-bottom-bar {
        display: none !important;
    }
}
