/**
 * Long Island Today (LIT) - Production Styles
 * Cookie Consent, PWA Install Prompt
 */

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white, #ffffff);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#cookie-consent-banner.visible {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 900px) {
    .cookie-consent-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 24px 32px;
    }
}

.cookie-consent-text {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.cookie-consent-icon {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.cookie-consent-text h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900, #171717);
    margin: 0 0 4px 0;
}

.cookie-consent-text p {
    font-size: 0.875rem;
    color: var(--gray-600, #525252);
    margin: 0;
    line-height: 1.5;
    max-width: 500px;
}

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.cookie-btn-primary {
    background: var(--primary, #E86A33);
    color: white;
}

.cookie-btn-primary:hover {
    background: var(--primary-dark, #d35a24);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 106, 51, 0.3);
}

.cookie-btn-secondary {
    background: var(--gray-200, #e5e5e5);
    color: var(--gray-700, #404040);
}

.cookie-btn-secondary:hover {
    background: var(--gray-300, #d4d4d4);
}

.cookie-btn-outline {
    background: transparent;
    color: var(--primary, #E86A33);
    border: 2px solid var(--primary, #E86A33);
}

.cookie-btn-outline:hover {
    background: var(--primary, #E86A33);
    color: white;
}

/* Cookie Customize Panel */
.cookie-consent-customize {
    border-top: 1px solid var(--gray-200, #e5e5e5);
    padding: 20px 24px;
    background: var(--gray-50, #fafafa);
}

@media (min-width: 900px) {
    .cookie-consent-customize {
        padding: 20px 32px;
    }
}

.cookie-option {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200, #e5e5e5);
}

.cookie-option:last-of-type {
    border-bottom: none;
}

.cookie-option label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-700, #404040);
    line-height: 1.5;
}

.cookie-option label strong {
    color: var(--gray-900, #171717);
}

.cookie-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary, #E86A33);
    cursor: pointer;
    flex-shrink: 0;
}

.cookie-option input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-customize-actions {
    padding-top: 16px;
    display: flex;
    justify-content: flex-end;
}


/* ============================================
   PWA INSTALL PROMPT
   ============================================ */

#pwa-install-prompt {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 400px;
    background: var(--white, #ffffff);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 500px) {
    #pwa-install-prompt {
        left: auto;
        right: 24px;
        bottom: 24px;
    }
}

#pwa-install-prompt.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pwa-prompt-content {
    padding: 24px;
    position: relative;
}

.pwa-prompt-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: var(--gray-100, #f5f5f5);
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--gray-500, #737373);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pwa-prompt-close:hover {
    background: var(--gray-200, #e5e5e5);
    color: var(--gray-700, #404040);
}

.pwa-prompt-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--primary-lighter, #fff5f0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-prompt-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.pwa-prompt-text {
    text-align: center;
    margin-bottom: 20px;
}

.pwa-prompt-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900, #171717);
    margin: 0 0 8px 0;
}

.pwa-prompt-text p {
    font-size: 0.9rem;
    color: var(--gray-600, #525252);
    margin: 0;
    line-height: 1.5;
}

.pwa-prompt-actions {
    display: flex;
    gap: 12px;
}

.pwa-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.pwa-btn-primary {
    background: var(--primary, #E86A33);
    color: white;
}

.pwa-btn-primary:hover {
    background: var(--primary-dark, #d35a24);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 106, 51, 0.3);
}

.pwa-btn-secondary {
    background: var(--gray-100, #f5f5f5);
    color: var(--gray-700, #404040);
}

.pwa-btn-secondary:hover {
    background: var(--gray-200, #e5e5e5);
}


/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 500px) {
    .cookie-consent-actions {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
    
    #pwa-install-prompt {
        bottom: 16px;
        left: 16px;
        right: 16px;
    }
    
    .pwa-prompt-content {
        padding: 20px;
    }
}


/* ============================================
   PRINT: HIDE ALL OVERLAYS
   ============================================ */

@media print {
    #cookie-consent-banner,
    #pwa-install-prompt {
        display: none !important;
    }
}


/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    #cookie-consent-banner,
    #pwa-install-prompt {
        transition: none;
    }
    
    #cookie-consent-banner.visible,
    #pwa-install-prompt.visible {
        transition: none;
    }
}
