:root {
    --cookie-consent-bg: #ffffff;
    --cookie-consent-text: #1b1b1b;
    --cookie-consent-border: rgba(0, 0, 0, 0.08);
    --cookie-consent-overlay: rgba(11, 18, 38, 0.55);
    --cookie-consent-primary: #1b3867;
    --cookie-consent-primary-hover: #14294c;
    --cookie-consent-accent: #f0f4ff;
}

.cookie-consent {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 9999;
    font-family: inherit;
}

.cookie-consent__overlay {
    position: fixed;
    inset: 0;
    background: var(--cookie-consent-overlay);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.cookie-consent .container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 2;
}

.cookie-consent__dialog,
.cookie-consent__banner {
    position: relative;
    width: min(800px, 92vw);
    margin: 24px;
    background: var(--cookie-consent-bg);
    color: var(--cookie-consent-text);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 20, 44, 0.18);
    border: 1px solid var(--cookie-consent-border);
    padding: 28px 32px;
    z-index: 1;
}

.cookie-consent__header h2 {
    font-size: 1.45rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.cookie-consent__intro {
    margin-bottom: 24px;
    color: rgba(17, 24, 39, 0.78);
    line-height: 1.6;
}

.cookie-consent__summary {
    background: rgba(255, 193, 7, 0.18);
    border: 1px solid rgba(255, 193, 7, 0.55);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: #704100;
    line-height: 1.5;
}

.cookie-consent__summary--success {
    background: rgba(25, 135, 84, 0.12);
    border-color: rgba(25, 135, 84, 0.45);
    color: #0f5132;
}

.cookie-consent__summary--danger {
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.45);
    color: #842029;
}

.cookie-consent__category {
    border: 1px solid var(--cookie-consent-border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 0;
    background: var(--cookie-consent-accent);
}

.cookie-consent__preferences {
    display: grid;
    gap: 12px;
}

.cookie-consent__preferences>.cookie-consent__category:first-child {
    margin-top: 12px;
}

.cookie-consent__preferences>.cookie-consent__category:last-child {
    margin-bottom: 12px;
}

.cookie-consent__category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-consent__category-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.cookie-consent__category-description {
    margin: 12px 0 0;
    font-size: 0.95rem;
    color: rgba(17, 24, 39, 0.75);
}

.cookie-consent__service-list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.cookie-consent__service-list li {
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid var(--cookie-consent-border);
}

.cookie-consent__service-list strong {
    display: block;
    margin-bottom: 6px;
}

.cookie-consent__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.cookie-consent__link {
    color: var(--cookie-consent-primary);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-consent__button {
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-consent__buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-consent__button--accept {
    background: var(--cookie-consent-primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(27, 56, 103, 0.25);
}

.cookie-consent__button--accept:hover,
.cookie-consent__button--accept:focus {
    background: var(--cookie-consent-primary-hover);
}

.cookie-consent__button--save {
    background: transparent;
    border: 1px solid var(--cookie-consent-primary);
    color: var(--cookie-consent-primary);
}

.cookie-consent__button--save:hover,
.cookie-consent__button--save:focus {
    background: rgba(27, 56, 103, 0.08);
}

.cookie-consent__button--required {
    background: rgba(17, 24, 39, 0.08);
    color: var(--cookie-consent-text);
}

.cookie-consent__button--required:hover,
.cookie-consent__button--required:focus {
    background: rgba(17, 24, 39, 0.14);
}

.cookie-consent__button--switch {
    background: transparent;
    color: var(--cookie-consent-primary);
    border: 1px solid rgba(27, 56, 103, 0.25);
}

.cookie-consent__button--switch:hover,
.cookie-consent__button--switch:focus {
    background: rgba(27, 56, 103, 0.08);
}

.cookie-consent__button--reject {
    background: rgba(220, 53, 69, 0.12);
    color: #b4232c;
}

.cookie-consent__button--reject:hover,
.cookie-consent__button--reject:focus {
    background: rgba(220, 53, 69, 0.2);
}

.cookie-consent__toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cookie-consent__toggle input {
    width: 0;
    height: 0;
    opacity: 0;
}

.cookie-consent__toggle span {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    background: rgba(17, 24, 39, 0.26);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.cookie-consent__toggle span::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.cookie-consent__toggle input:checked+span {
    background: var(--cookie-consent-primary);
}

.cookie-consent__toggle input:checked+span::after {
    transform: translateX(20px);
}

.cookie-consent__toggle input:disabled+span {
    background: rgba(17, 24, 39, 0.45);
    opacity: 0.75;
}

.cookie-consent__toggle input:disabled+span::after {
    box-shadow: none;
}

.cookie-consent__reopen {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--cookie-consent-primary);
    color: #fff;
    box-shadow: 0 12px 32px rgba(27, 56, 103, 0.35);
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 9998;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cookie-consent__reopen::before {
    content: '\f0f3';
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 5 Pro', 'FontAwesome', 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 18px;
}

.cookie-consent__reopen.is-ready {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent__reopen:hover {
    background: var(--cookie-consent-primary-hover);
}

@media (max-width: 640px) {
    .cookie-consent__dialog {
        width: 94vw;
        margin: 16px;
        padding: 22px 18px;
    }

    .cookie-consent__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent__actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-consent__button {
        width: 100%;
        text-align: center;
    }
}
