/* * SmartStay Public Styles 
 * Based on 'SmartStay Guest Portal - Style Guide'
 */

/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Glassmorphism Utility */
.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* * Custom Toggle Switch Logic */
.toggle-checkbox:checked {
    right: 0;
    border-color: #10B981;
}
.toggle-checkbox:checked + .toggle-label {
    background-color: #10B981;
}

/* * Thermostat & Animations */
.thermostat-ring {
    transition: stroke-dashoffset 0.5s ease-in-out;
}

@keyframes modalPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-content {
    animation: modalPop 0.2s ease-out forwards;
}

/* * Utility: Hide Scrollbars */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* * Custom Range Slider */
input[type=range] {
    -webkit-appearance: none; 
    background: transparent; 
    width: 100%;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #3b82f6; 
    margin-top: -8px; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 999px;
}

input[type=range]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #3b82f6;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 999px;
}

body.admin-bar #smartstay-app {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar #smartstay-app {
        top: 46px;
    }
}

/* --- NEW PWA TOAST STYLES --- */

/* Container: Floating Glass Card */
#smartstay-pwa-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 420px;
    
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    
    /* Shadow & Shape */
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05), 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0,0,0,0.02);
    border-radius: 24px;
    padding: 12px 16px;
    
    /* Layout */
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Animation Initial State */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Visible State */
#smartstay-pwa-toast.ss-pwa-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Hidden State */
#smartstay-pwa-toast.ss-pwa-hidden {
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

/* Inner Layout */
.ss-pwa-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Icon Box */
.ss-pwa-icon-box {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.ss-pwa-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Typography */
.ss-pwa-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ss-pwa-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b; /* Slate-800 */
    line-height: 1.2;
}

.ss-pwa-subtitle {
    font-size: 12px;
    color: #64748b; /* Slate-500 */
    font-weight: 500;
}

/* Action Buttons */
.ss-pwa-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 12px;
}

#pwa-install-btn {
    background-color: #2563eb; /* Blue-600 */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: transform 0.2s ease, background-color 0.2s;
    white-space: nowrap;
}

#pwa-install-btn:active {
    transform: scale(0.96);
}

#pwa-install-btn:hover {
    background-color: #1d4ed8;
}

#pwa-dismiss-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

#pwa-dismiss-btn:hover {
    color: #475569;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    #smartstay-pwa-toast {
        bottom: 20px;
        width: calc(100% - 32px);
        padding: 12px;
    }
    
    .ss-pwa-text {
        max-width: 140px;
    }
    
    .ss-pwa-subtitle {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}