/* ==========================================================================
   PYD Cookie & Data Protection Consent Banner & Modal Styles
   ========================================================================== */

/* 1. Floating Cookie Launcher Widget */
.pyd-consent-floating-launcher {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 999980;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.95rem;
    border-radius: 9999px;
    background: rgba(2, 48, 71, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(2, 132, 199, 0.4);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), 0 0 15px rgba(2, 132, 199, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pyd-consent-floating-launcher:hover {
    background: #0284c7;
    border-color: #38bdf8;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 22px rgba(2, 132, 199, 0.45);
    transform: translateY(-2px);
}

.pyd-consent-floating-launcher svg {
    color: #38bdf8;
    transition: color 0.2s ease;
}

.pyd-consent-floating-launcher:hover svg {
    color: #ffffff;
}

/* 2. Consent Banner Wrapper */
.pyd-consent-banner-wrap {
    position: fixed;
    z-index: 999990;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: pydSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pydSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.pyd-consent-banner-wrap.is-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.35s ease;
    pointer-events: none;
}

/* Positions */
.pyd-consent-banner-wrap.bottom-float {
    bottom: 1.5rem;
    right: 1.5rem;
    max-width: 480px;
    width: calc(100% - 3rem);
}

.pyd-consent-banner-wrap.bottom-bar {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 0;
}

.pyd-consent-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(2, 32, 48, 0.92) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 1.6rem;
    color: #ffffff;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(2, 132, 199, 0.2);
}

.consent-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.consent-shield-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(2, 132, 199, 0.15);
    border: 1px solid rgba(2, 132, 199, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.consent-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.consent-badge-ndpr {
    display: inline-block;
    font-size: 0.68rem;
    font-family: monospace;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(2, 132, 199, 0.18);
    border: 1px solid rgba(2, 132, 199, 0.3);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.consent-card-body {
    margin-bottom: 1.25rem;
}

.consent-desc {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.55;
    margin: 0;
}

.consent-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Common Consent Buttons */
.pyd-cbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    border: none;
}

.pyd-cbtn-primary {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
}

.pyd-cbtn-primary:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

.pyd-cbtn-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.pyd-cbtn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.pyd-cbtn-text {
    background: transparent;
    color: #94a3b8;
    font-size: 0.82rem;
    padding: 0.4rem 0.5rem;
    text-decoration: underline;
}

.pyd-cbtn-text:hover {
    color: #38bdf8;
}

/* 3. Consent Preferences Modal */
.pyd-consent-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(2, 10, 16, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pyd-consent-modal-backdrop.is-open {
    display: flex;
    opacity: 1;
}

.pyd-consent-modal-container {
    background: #0b1522;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    color: #ffffff;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(2, 132, 199, 0.25);
    animation: pydModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pydModalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.35rem 0;
}

.modal-subtext {
    font-size: 0.88rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.modal-close-x {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.modal-close-x:hover {
    color: #ffffff;
}

/* Category Rows */
.modal-category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.consent-cat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 1.2rem;
}

.cat-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

.cat-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.cat-pill {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: rgba(2, 132, 199, 0.18);
    color: #38bdf8;
    font-weight: 700;
}

.cat-pill.pill-locked {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
}

.cat-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.45;
    margin: 0;
}

/* Custom Checkbox Toggle */
.pyd-toggle-input {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 24px;
    background: #334155;
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background 0.25s ease;
}

.pyd-toggle-input::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s ease;
}

.pyd-toggle-input:checked {
    background: #0284c7;
}

.pyd-toggle-input:checked::after {
    transform: translateX(20px);
}

.pyd-toggle-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.modal-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-policy-link {
    color: #94a3b8;
    font-size: 0.85rem;
    text-decoration: underline;
}

.modal-policy-link:hover {
    color: #38bdf8;
}

.modal-btn-group {
    display: flex;
    gap: 0.75rem;
}

@media (max-width: 600px) {
    .pyd-consent-banner-wrap.bottom-float {
        bottom: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }
    .modal-footer-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .modal-btn-group {
        flex-direction: column;
    }
}
