/**
 * CH Cookie Consent - Styles
 *
 * @author  Sports Online Limited
 * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0
 * @version 1.0.0
 */

/* ---------------------------------------------------------------
   Overlay
   --------------------------------------------------------------- */

.chcc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.chcc-overlay.chcc-visible {
    opacity: 1;
    visibility: visible;
}

/* ---------------------------------------------------------------
   Banner
   --------------------------------------------------------------- */

.chcc-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.35s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.chcc-banner--bottom {
    bottom: 0;
    transform: translateY(100%);
}

.chcc-banner--top {
    top: 0;
    transform: translateY(-100%);
}

.chcc-banner.chcc-visible {
    transform: translateY(0);
}

.chcc-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.chcc-banner__text {
    flex: 1;
    min-width: 0;
}

.chcc-banner__title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #222;
}

.chcc-banner__desc {
    margin: 0;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.chcc-banner__policy-link {
    color: #2e6da4;
    text-decoration: underline;
    white-space: nowrap;
}

.chcc-banner__buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
}

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */

.chcc-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    transition: opacity 0.2s ease, transform 0.1s ease;
    font-family: inherit;
    line-height: 1.4;
}

.chcc-btn:hover {
    opacity: 0.9;
}

.chcc-btn:active {
    transform: scale(0.97);
}

.chcc-btn--accept {
    color: #fff;
}

.chcc-btn--reject {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
}

.chcc-btn--reject:hover {
    background: #e8e8e8;
}

.chcc-btn--customise {
    background: transparent;
    color: #555;
    padding: 10px 14px;
    text-decoration: underline;
}

.chcc-btn--customise:hover {
    color: #222;
}

/* ---------------------------------------------------------------
   Settings Panel
   --------------------------------------------------------------- */

.chcc-settings {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 100000;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #333;
}

.chcc-settings.chcc-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.chcc-settings__inner {
    padding: 24px;
}

.chcc-settings__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #222;
}

.chcc-settings__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    gap: 16px;
}

.chcc-settings__row:last-of-type {
    border-bottom: none;
}

.chcc-settings__label-wrap {
    flex: 1;
    min-width: 0;
}

.chcc-settings__label-wrap strong {
    display: block;
    font-size: 14px;
    color: #222;
    margin-bottom: 2px;
}

.chcc-settings__desc {
    margin: 0;
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}

.chcc-settings__always-on {
    font-size: 12px;
    color: #27ae60;
    font-weight: 600;
    white-space: nowrap;
    padding-top: 2px;
}

.chcc-settings__save {
    width: 100%;
    margin-top: 20px;
}

/* ---------------------------------------------------------------
   Toggle Switch
   --------------------------------------------------------------- */

.chcc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
    margin-top: 2px;
}

.chcc-toggle__input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.chcc-toggle__slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.25s ease;
}

.chcc-toggle__slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
}

.chcc-toggle__input:checked + .chcc-toggle__slider::before {
    transform: translateX(20px);
}

/* ---------------------------------------------------------------
   Floating Settings Button
   --------------------------------------------------------------- */

.chcc-settings-btn {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 99997;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: opacity 0.3s ease, visibility 0.3s ease, box-shadow 0.2s ease;
    opacity: 0;
    visibility: hidden;
    padding: 0;
}

.chcc-settings-btn.chcc-visible {
    opacity: 1;
    visibility: visible;
}

.chcc-settings-btn:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    color: #222;
}

/* ---------------------------------------------------------------
   Mobile
   --------------------------------------------------------------- */

@media (max-width: 768px) {
    .chcc-banner__inner {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 14px;
    }

    .chcc-banner__buttons {
        flex-direction: column;
        width: 100%;
    }

    .chcc-btn {
        width: 100%;
        padding: 12px 16px;
    }

    .chcc-btn--customise {
        padding: 8px 16px;
    }

    .chcc-settings {
        width: 95%;
        max-height: 90vh;
    }

    .chcc-settings__inner {
        padding: 18px;
    }
}
