/*
 * Cookie banner + settings dialog — markup in components/cookie-consent/banner.blade.php.
 * Matches the site chrome: black glass panel like <header>, pill buttons like the
 * header's "Get in Touch" (.get-btn) / "Book a Demo" (.demo-btn), brand blue #1431cf.
 */

.cc-banner,
.cc-dialog {
    --cc-blue: #1431cf;
    --cc-blue-hover: #2a46e6;
    --cc-panel: rgba(0, 0, 0, 0.88);
    --cc-line: rgba(255, 255, 255, 0.14);
    --cc-text: #fff;
    --cc-muted: rgba(255, 255, 255, 0.72);
    font-family: Gabarito, sans-serif;
}

.cc-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 20px;
    z-index: 1040;
    max-width: 1180px;
    margin: 0 auto;
    background: var(--cc-panel);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--cc-line);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    color: var(--cc-text);
    animation: cc-rise 0.35s ease-out;
}

.cc-banner[hidden] {
    display: none;
}

.cc-banner__inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px 18px 22px;
}

/* Blue disc — same glow as the header's "AI" pill */
.cc-banner__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2f6bff, var(--cc-blue));
    box-shadow: 0 0 22px rgba(47, 107, 255, 0.55);
    color: #fff;
}

.cc-banner__icon svg {
    width: 24px;
    height: 24px;
}

.cc-banner__copy {
    flex: 1;
    min-width: 0;
}

.cc-banner__title {
    margin: 0 0 2px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--cc-text);
}

.cc-banner__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--cc-muted);
}

.cc-banner__text a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cc-banner__text a:hover {
    color: #8fa6ff;
}

.cc-banner__actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 10px;
}

/* Pill buttons — .cc-btn--primary ≈ .get-btn, .cc-btn--ghost ≈ .demo-btn */
.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: 30px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.cc-btn--primary {
    background: var(--cc-blue);
    color: #fff;
}

.cc-btn--primary:hover {
    background: var(--cc-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(20, 49, 207, 0.45);
}

.cc-btn--ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.cc-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.7);
}

.cc-btn--link {
    background: none;
    padding-left: 10px;
    padding-right: 10px;
    color: var(--cc-muted);
    font-weight: 500;
}

.cc-btn--link:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cc-btn__arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.cc-btn:hover .cc-btn__arrow {
    transform: rotate(45deg);
}

.cc-btn:focus-visible,
.cc-dialog__close:focus-visible,
.cc-switch input:focus-visible + .cc-switch__track {
    outline: 2px solid #8fa6ff;
    outline-offset: 2px;
}

/* Settings dialog */

.cc-dialog {
    /* Site-wide resets zero <dialog>'s UA margin; restore centring explicitly */
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(580px, calc(100vw - 32px));
    height: fit-content;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 0;
    border: 1px solid var(--cc-line);
    border-radius: 20px;
    background: #0b0b0f;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    color: var(--cc-text);
}

.cc-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.cc-dialog__form {
    padding: 26px 26px 22px;
}

.cc-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cc-dialog__title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.cc-dialog__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--cc-line);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cc-dialog__close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cc-dialog__intro {
    margin: 8px 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--cc-muted);
}

.cc-dialog__list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cc-category {
    padding: 14px 16px;
    border: 1px solid var(--cc-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.cc-category__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    cursor: pointer;
}

.cc-category__label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.cc-category__badge {
    padding: 2px 10px;
    border-radius: 30px;
    background: rgba(20, 49, 207, 0.25);
    color: #a9b8ff;
    font-size: 12px;
    font-weight: 500;
}

.cc-category__desc {
    margin: 6px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--cc-muted);
}

/* Toggle switch */

.cc-switch {
    position: relative;
    flex: none;
    width: 46px;
    height: 26px;
}

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

.cc-switch__track {
    position: absolute;
    inset: 0;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s;
    pointer-events: none;
}

.cc-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.cc-switch input:checked + .cc-switch__track {
    background: var(--cc-blue);
}

.cc-switch input:checked + .cc-switch__track::after {
    transform: translateX(20px);
}

.cc-switch input:disabled,
.cc-switch input:disabled + .cc-switch__track {
    cursor: not-allowed;
    opacity: 0.6;
}

.cc-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.cc-dialog__actions .cc-btn--link {
    margin-right: auto;
}

@keyframes cc-rise {
    from {
        transform: translateY(24px);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-banner {
        animation: none;
    }

    .cc-btn,
    .cc-btn__arrow {
        transition: none;
    }
}

@media (max-width: 991.98px) {
    .cc-banner__inner {
        flex-wrap: wrap;
    }

    .cc-banner__copy {
        flex-basis: calc(100% - 64px);
    }

    .cc-banner__actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 575.98px) {
    .cc-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        border-radius: 18px;
    }

    .cc-banner__inner {
        gap: 14px;
        padding: 16px;
    }

    .cc-banner__icon {
        width: 40px;
        height: 40px;
    }

    .cc-banner__title {
        font-size: 16px;
    }

    .cc-banner__text {
        font-size: 13.5px;
    }

    .cc-banner__actions {
        flex-wrap: wrap;
    }

    .cc-banner__actions .cc-btn--ghost,
    .cc-banner__actions .cc-btn--primary {
        flex: 1;
    }

    .cc-banner__actions .cc-btn--link {
        order: 3;
        flex-basis: 100%;
    }

    .cc-dialog__form {
        padding: 20px 18px 18px;
    }

    .cc-dialog__actions .cc-btn {
        flex: 1 1 100%;
    }

    .cc-dialog__actions .cc-btn--link {
        margin-right: 0;
    }
}
