.cookie-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    pointer-events: none;
}

.cookie-consent-modal.is-visible {
    display: block;
}

.cookie-consent-dialog {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    pointer-events: auto;
}

.cookie-consent-card {
    width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #dfe3ea;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    color: #111827;
}

.cookie-consent-title {
    margin: 0;
    font-size: 19px;
    line-height: 1.25;
    font-weight: 700;
    color: #111827;
}

.cookie-consent-text {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: #5b6270;
}

.cookie-consent-text a {
    color: #2563eb;
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.cookie-consent-button {
    display: block;
    width: 50%;
    min-height: 32px;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cookie-consent-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.25);
}

.cookie-consent-button-primary {
    background: #4169e1;
    border-color: #4169e1;
    color: #ffffff;
}

.cookie-consent-button-primary:hover,
.cookie-consent-button-primary:focus {
    background: #3158d4;
    border-color: #3158d4;
    color: #ffffff;
}

.cookie-consent-button-secondary {
    margin-top: 0;
    background: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}

.cookie-consent-button-secondary:hover,
.cookie-consent-button-secondary:focus {
    background: #f9fafb;
    border-color: #c4c9d2;
    color: #111827;
}

.cookie-consent-customize {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    color: #111827;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.cookie-consent-customize:hover,
.cookie-consent-customize:focus {
    color: #2563eb;
    outline: none;
}

.cookie-consent-settings {
    display: none;
}

.cookie-consent-settings.is-visible {
    display: block;
}

.cookie-consent-main.is-hidden {
    display: none;
}

.cookie-consent-options {
    margin-top: 14px;
}

.cookie-consent-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
}

.cookie-consent-option:last-child {
    margin-bottom: 0;
}

.cookie-consent-option-content {
    flex: 1;
    min-width: 0;
}

.cookie-consent-option-side {
    flex: 0 0 auto;
}

.cookie-consent-option-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    color: #111827;
}

.cookie-consent-option-text {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: #6b7280;
}

.cookie-consent-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 600;
    white-space: nowrap;
}

.cookie-consent-checkbox {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    cursor: pointer;
}

/* Desktop */
@media (min-width: 768px) {
    .cookie-consent-dialog {
        left: 9px;
        right: auto;
        bottom: 32px;
        width: 560px;
    }

    .cookie-consent-card {
        padding: 15px;
        border-radius: 20px;
        max-height: calc(100vh - 64px);
    }

    .cookie-consent-title {
        font-size: 17px;
    }

    .cookie-consent-text {
        margin-top: 16px;
        font-size: 14px;
        line-height: 1.55;
    }

    .cookie-consent-actions {
        gap: 12px;
        margin-top: 17px;
    }

    .cookie-consent-button {
        min-height: 22px;
        padding: 12px 18px;
        border-radius: 12px;
        font-size: 15px;
        line-height: 1;
    }

    .cookie-consent-button-secondary {
        margin-top: 0;
    }

    .cookie-consent-customize {
        margin-top: 11px;
        padding: 10px 12px;
        font-size: 15px;
        line-height: 1;
    }

    .cookie-consent-options {
        margin-top: 22px;
    }

    .cookie-consent-option {
        gap: 16px;
        margin-bottom: 12px;
        padding: 16px;
        border-radius: 14px;
    }

    .cookie-consent-option-title {
        font-size: 15px;
        line-height: 1.35;
    }

    .cookie-consent-option-text {
        margin-top: 6px;
        font-size: 14px;
        line-height: 1.55;
    }

    .cookie-consent-badge {
        padding: 5px 10px;
        font-size: 12px;
    }

    .cookie-consent-checkbox {
        width: 20px;
        height: 20px;
    }
}

/* Mobile bottom sheet style */
@media (max-width: 767px) {
    .cookie-consent-dialog {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .cookie-consent-card {
        border-radius: 18px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .cookie-consent-card {
        padding: 14px;
        border-radius: 14px;
    }

    .cookie-consent-title {
        font-size: 18px;
    }

    .cookie-consent-text {
        font-size: 13px;
        line-height: 1.4;
    }

    .cookie-consent-actions {
        gap: 6px;
        margin-top: 14px;
    }

    .cookie-consent-button {
        min-height: 40px;
        padding: 8px 8px;
        border-radius: 9px;
        font-size: 13px;
    }

    .cookie-consent-customize {
        margin-top: 8px;
        font-size: 13px;
    }
}

/* iPhone safe area */
@supports (padding: env(safe-area-inset-bottom)) {
    .cookie-consent-dialog {
        bottom: calc(9px + env(safe-area-inset-bottom));
    }

    @media (max-width: 767px) {
        .cookie-consent-dialog {
            bottom: calc(9px + env(safe-area-inset-bottom));
        }
    }
}