/* ==========================================================================
   ahá Consulting & Solutions - Cookie Consent Module (BEM: .aha-cc-*)
   ========================================================================== */

.aha-cc-banner,
.aha-cc-modal-backdrop {
    font-family: "DM Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
    color: #565656;
    line-height: 1.5;
}

.aha-cc-banner *,
.aha-cc-banner *::before,
.aha-cc-banner *::after,
.aha-cc-modal-backdrop *,
.aha-cc-modal-backdrop *::before,
.aha-cc-modal-backdrop *::after {
    box-sizing: border-box;
}

/* --- Floating Banner (bottom-left so it never overlaps WhatsApp widget) --- */
.aha-cc-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    width: calc(100% - 48px);
    max-width: 470px;
    background-color: #ffffff;
    border: 1px solid #e2e5e0;
    border-top: 4px solid #9bbb4f;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    padding: 20px 22px;
    z-index: 99990;
    display: none;
}

.aha-cc-banner.aha-cc-banner--visible {
    display: block;
    animation: ahaCcSlideUp 0.25s ease-out;
}

@keyframes ahaCcSlideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aha-cc-banner__title {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 700;
    color: #3f3f3f;
    line-height: 1.3;
    font-family: inherit;
}

.aha-cc-banner__text {
    margin: 0 0 16px 0 !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    color: #565656 !important;
    font-family: inherit !important;
}

.aha-cc-banner__link {
    color: #7c9a36;
    text-decoration: underline;
    font-weight: 500;
}

.aha-cc-banner__link:hover,
.aha-cc-banner__link:focus {
    color: #565656;
}

.aha-cc-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* --- Buttons --- */
.aha-cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-family: inherit;
    text-align: center;
}

.aha-cc-btn:focus-visible {
    outline: 2px solid #9bbb4f;
    outline-offset: 2px;
}

.aha-cc-btn--primary {
    background-color: #9bbb4f;
    color: #ffffff;
    border-color: #9bbb4f;
}

.aha-cc-btn--primary:hover {
    background-color: #88a63f;
    border-color: #88a63f;
    color: #ffffff;
}

.aha-cc-btn--secondary {
    background-color: #565656;
    color: #ffffff;
    border-color: #565656;
}

.aha-cc-btn--secondary:hover {
    background-color: #424242;
    border-color: #424242;
    color: #ffffff;
}

.aha-cc-btn--outline {
    background-color: #ffffff;
    color: #565656;
    border-color: #cfd3cc;
}

.aha-cc-btn--outline:hover {
    background-color: #f4f6f2;
    border-color: #9bbb4f;
    color: #3f3f3f;
}

/* --- Modal Backdrop & Dialog --- */
.aha-cc-modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(34, 34, 34, 0.58);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 99999;
}

.aha-cc-modal-backdrop.aha-cc-modal-backdrop--open {
    display: flex;
}

.aha-cc-modal {
    background-color: #ffffff;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.aha-cc-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #eceeea;
    background-color: #fafbf9;
}

.aha-cc-modal__title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #3f3f3f;
    line-height: 1.3;
    font-family: inherit;
}

.aha-cc-modal__close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #6b6b6b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.aha-cc-modal__close:hover {
    color: #3f3f3f;
    background-color: #eceeea;
}

.aha-cc-modal__body {
    padding: 18px 22px;
    overflow-y: auto;
}

.aha-cc-modal__intro {
    margin: 0 0 16px 0 !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    color: #565656 !important;
    font-family: inherit !important;
}

.aha-cc-category {
    border: 1px solid #e6e8e3;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background-color: #fcfdfc;
}

.aha-cc-category:last-child {
    margin-bottom: 0;
}

.aha-cc-category__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.aha-cc-category__name {
    font-size: 15px;
    font-weight: 700;
    color: #3f3f3f;
    margin: 0;
}

.aha-cc-category__desc {
    margin: 0 !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    color: #666666 !important;
    font-family: inherit !important;
}

.aha-cc-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: #5d7721;
    background-color: #eef5dd;
    padding: 4px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

/* --- Toggle Switch --- */
.aha-cc-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 25px;
    flex-shrink: 0;
    margin: 0;
}

.aha-cc-switch__input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.aha-cc-switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbcfc7;
    transition: background-color 0.2s ease;
    border-radius: 25px;
}

.aha-cc-switch__slider::before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: transform 0.2s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.aha-cc-switch__input:checked + .aha-cc-switch__slider {
    background-color: #9bbb4f;
}

.aha-cc-switch__input:checked + .aha-cc-switch__slider::before {
    transform: translateX(21px);
}

.aha-cc-switch__input:focus-visible + .aha-cc-switch__slider {
    outline: 2px solid #9bbb4f;
    outline-offset: 2px;
}

.aha-cc-modal__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 15px 22px;
    border-top: 1px solid #eceeea;
    background-color: #fafbf9;
}

@media (max-width: 576px) {
    .aha-cc-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
        padding: 16px;
    }

    .aha-cc-banner__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .aha-cc-modal__footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .aha-cc-btn {
        width: 100%;
    }
}
