/* ============================================
   Cookie Consent Bar
   ============================================ */
#p3-cookie-consent {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1a1a2e;
    color: #e2e8f0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    font-family: inherit;
}
#p3-cookie-consent.is-visible {
    display: block;
}

.p3-cc-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
}

.p3-cc-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.p3-cc-text {
    flex: 1;
    min-width: 280px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.p3-cc-text a {
    color: #93c5fd;
    text-decoration: underline;
}

.p3-cc-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.p3-cc-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.p3-cc-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Configure panel — hidden by default */
.p3-cc-config {
    display: none;
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.p3-cc-config.is-open {
    display: block;
}

.p3-cc-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.p3-cc-toggle-row:last-of-type {
    border-bottom: none;
}

.p3-cc-toggle-label {
    font-size: 0.9rem;
}
.p3-cc-toggle-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

/* Toggle switch */
.p3-cc-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.p3-cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.p3-cc-switch-slider {
    position: absolute;
    inset: 0;
    background: #475569;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
}
.p3-cc-switch-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}
.p3-cc-switch input:checked + .p3-cc-switch-slider {
    background: #167b35;
}
.p3-cc-switch input:checked + .p3-cc-switch-slider::before {
    transform: translateX(20px);
}
.p3-cc-switch input:disabled + .p3-cc-switch-slider {
    opacity: 0.5;
    cursor: default;
}

.p3-cc-config-save {
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: #167b35;
    color: #fff;
    transition: background 0.2s;
}
.p3-cc-config-save:hover {
    background: #00851a;
}

/* Mobile */
@media (max-width: 600px) {
    .p3-cc-main {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .p3-cc-buttons {
        flex-direction: column;
    }
    .p3-cc-btn {
        text-align: center;
    }
    .p3-cc-inner {
        padding: 1rem;
    }
}
