.ecm-consent-open {
    overflow: hidden;
}

.ecm-consent-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999998;
    box-sizing: border-box;
    padding: 12px 16px;
    background: #111111;
    color: #ffffff;
    direction: rtl;
    text-align: right;
    font-family: inherit;
    border-top: 3px solid #ef6429;
    box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.25);
}

.ecm-consent-banner[hidden] {
    display: none !important;
}

.ecm-consent-banner-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ecm-consent-banner-text {
    margin: 0;
    flex: 1 1 auto;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.55;
}

.ecm-consent-banner-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ecm-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
}

.ecm-consent-overlay[hidden] {
    display: none !important;
}

.ecm-consent-modal {
    width: min(640px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
    position: relative;
    box-sizing: border-box;
    padding: 28px;
    border-radius: 24px;
    background: #111111;
    color: #ffffff;
    direction: rtl;
    text-align: right;
    font-family: inherit;
    border: 1px solid rgba(239, 100, 41, 0.55);
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.38);
}

.ecm-consent-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(239, 100, 41, 0.5);
    border-radius: 999px;
    background: #1c1c1c;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ecm-consent-close:hover {
    background: #ef6429;
}

.ecm-consent-modal h2 {
    margin: 0 0 12px;
    padding-inline-end: 8px;
    color: #ffffff;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.15;
}

.ecm-consent-text {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    line-height: 1.65;
}

.ecm-consent-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.ecm-consent-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(239, 100, 41, 0.32);
    border-radius: 16px;
    background: #1b1b1b;
    cursor: pointer;
}

.ecm-consent-row:hover {
    border-color: rgba(239, 100, 41, 0.75);
}

.ecm-consent-row-fixed {
    cursor: default;
    border-color: rgba(239, 100, 41, 0.58);
    background: #151515;
}

.ecm-consent-row-fixed:hover {
    border-color: rgba(239, 100, 41, 0.58);
}

.ecm-always-active-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(239, 100, 41, 0.18);
    border: 1px solid rgba(239, 100, 41, 0.55);
    color: #ef6429;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.ecm-consent-copy {
    display: grid;
    gap: 4px;
}

.ecm-consent-copy strong {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.3;
}

.ecm-consent-copy span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.55;
}

.ecm-switch {
    position: relative;
    display: inline-flex;
    width: 54px;
    height: 30px;
    flex: 0 0 auto;
}

.ecm-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ecm-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #555555;
    transition: 0.2s ease;
}

.ecm-slider::before {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ffffff;
    transition: 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.ecm-switch input:checked + .ecm-slider {
    background: #ef6429;
}

.ecm-switch input:checked + .ecm-slider::before {
    transform: translateX(-24px);
}

.ecm-switch input:focus-visible + .ecm-slider {
    outline: 3px solid rgba(239, 100, 41, 0.35);
    outline-offset: 3px;
}

.ecm-privacy-link {
    display: inline-flex;
    margin: 4px 0 18px;
    color: #ef6429;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ecm-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 8px;
}

.ecm-btn,
.ecm-settings-button {
    appearance: none;
    border: 1px solid #ef6429;
    border-radius: 999px;
    padding: 10px 16px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.ecm-btn:hover,
.ecm-settings-button:hover {
    transform: translateY(-1px);
}

.ecm-btn-primary {
    background: #ef6429;
    color: #ffffff;
}

.ecm-btn-secondary {
    background: #ffffff;
    border-color: #ffffff;
    color: #111111;
}

.ecm-btn-ghost {
    border-color: rgba(239, 100, 41, 0.55);
    background: transparent;
    color: #ffffff;
    text-decoration: none;
}

.ecm-btn-ghost:hover {
    background: rgba(239, 100, 41, 0.14);
}

.ecm-settings-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99999;
    background: #ef6429;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

.ecm-settings-button[hidden] {
    display: none !important;
}

@media (max-width: 820px) {
    .ecm-consent-banner-inner {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .ecm-consent-banner-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        white-space: normal;
    }

    .ecm-consent-banner .ecm-btn {
        width: 100%;
        padding-inline: 10px;
    }
}

@media (max-width: 640px) {
    .ecm-consent-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .ecm-consent-modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 24px 24px 0 0;
        padding: 24px 18px;
    }

    .ecm-consent-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ecm-always-active-badge {
        justify-self: start;
    }

    .ecm-consent-actions {
        display: grid;
    }

    .ecm-btn {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .ecm-consent-banner-actions {
        grid-template-columns: 1fr;
    }
}
