/**
 * Cookie Consent Banner Styles
 * LOCATION: /public/templates/t1/consent.css
 * 
 * Banner appears at TOP of page and PUSHES content down (not overlay)
 * Root container handles sticky behavior
 */

/* Root container - THIS is sticky, not the banner */
#jd-consent-root:not(:empty) {
    position: sticky;
    top: 0;
    z-index: 9999;
}

/* Banner - normal block element */
.jd-consent-banner {
    background: var(--ink, #1a1d21);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Inner container */
.jd-consent-banner__inner {
    max-width: var(--max-width, 1280px);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

/* Message text */
.jd-consent-banner__message {
    flex: 1;
    min-width: 200px;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Button group */
.jd-consent-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

/* Privacy link */
.jd-consent-banner__privacy {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
    transition: color 0.2s;
}

.jd-consent-banner__privacy:hover {
    color: white;
}

/* ==========================================
   BUTTONS
   ========================================== */

.jd-consent-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.1s;
    white-space: nowrap;
    font-family: inherit;
}

.jd-consent-btn:active {
    transform: scale(0.98);
}

.jd-consent-btn--primary {
    background: var(--jade, #00876c);
    color: white;
}

.jd-consent-btn--primary:hover {
    background: var(--jade-dark, #006d57);
}

.jd-consent-btn--secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.jd-consent-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.jd-consent-btn--link {
    background: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.625rem 0.5rem;
    text-decoration: underline;
}

.jd-consent-btn--link:hover {
    color: white;
}

/* ==========================================
   CUSTOMIZE PANEL
   ========================================== */

.jd-consent-customize {
    display: none;
    background: var(--ink-light, #2d3138);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.jd-consent-customize--open {
    display: block;
}

.jd-consent-customize__inner {
    max-width: var(--max-width, 1280px);
    margin: 0 auto;
    padding: 1.5rem;
}

/* Individual option */
.jd-consent-option {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.jd-consent-option label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.jd-consent-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--jade, #00876c);
    cursor: pointer;
}

.jd-consent-option input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.jd-consent-option strong {
    font-weight: 600;
}

.jd-consent-option p {
    margin: 0.5rem 0 0 1.75rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* Action buttons in customize panel */
.jd-consent-customize__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .jd-consent-banner__inner {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem 1rem;
    }
    
    .jd-consent-banner__message {
        min-width: 100%;
    }
    
    .jd-consent-banner__actions {
        width: 100%;
        justify-content: center;
    }
    
    .jd-consent-btn {
        flex: 1;
        min-width: 100px;
        padding: 0.75rem 1rem;
    }
    
    .jd-consent-btn--link {
        flex: none;
        width: 100%;
    }
    
    .jd-consent-customize__inner {
        padding: 1rem;
    }
    
    .jd-consent-customize__actions {
        flex-direction: column;
    }
    
    .jd-consent-customize__actions .jd-consent-btn {
        width: 100%;
    }
}

/* ==========================================
   ENSURE PROPER STACKING
   ========================================== */

/* Site header should be below consent banner */
.site-header {
    position: relative;
    z-index: 100;
}