/* =========================================================
   IZA – DIN BEHANDLINGSGUIDE
========================================================= */

.iza-chatbot,
.iza-chatbot * {
    box-sizing: border-box;
}

.iza-chatbot {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    font-family: Arial, Helvetica, sans-serif;
}

/* =========================================================
   ÅBN-KNAP
========================================================= */

.iza-chat-open {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
    padding: 13px 18px;
    border: 0;
    border-radius: 999px;
    background: #42664a;
    color: #ffffff;
    box-shadow: 0 14px 40px rgba(36, 67, 44, 0.25);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.iza-chat-open:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(36, 67, 44, 0.32);
}

.iza-chat-open.hidden,
.iza-chat-open.is-hidden {
    display: none;
}

.iza-chat-open-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 700;
}

.iza-chat-open-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}

.iza-chat-open-text strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.1;
}

.iza-chat-open-text span {
    font-size: 12px;
    opacity: 0.86;
}

/* =========================================================
   CHATVINDUE
========================================================= */

.iza-chat-window {
    position: absolute;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    width: min(390px, calc(100vw - 32px));
    height: min(650px, calc(100vh - 48px));
    overflow: hidden;
    border: 1px solid rgba(66, 102, 74, 0.15);
    border-radius: 26px;
    background: #fbfaf6;
    box-shadow: 0 25px 70px rgba(28, 48, 33, 0.28);
}

.iza-chat-window.active,
.iza-chat-window.is-open {
    display: flex;
}

/* =========================================================
   HEADER
========================================================= */

.iza-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 18px;
    background: #42664a;
    color: #ffffff;
}

.iza-chat-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 700;
}

.iza-chat-title {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

.iza-chat-title strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
}

.iza-chat-title span {
    font-size: 12px;
    opacity: 0.84;
}

.iza-chat-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.iza-chat-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #bce4be;
}

.iza-chat-close {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.iza-chat-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* =========================================================
   BESKEDOMRÅDE
========================================================= */

.iza-chat-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 11px;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 17px 15px;
    scroll-behavior: smooth;
}

.iza-chat-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    animation: izaMessageIn 0.25s ease;
}

.iza-chat-message-bot {
    justify-content: flex-start;
}

.iza-chat-message-user {
    justify-content: flex-end;
}

.iza-chat-message-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dfeadf;
    color: #42664a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-weight: 700;
}

.iza-chat-message-bubble {
    max-width: 82%;
    padding: 12px 14px;
    border-radius: 17px;
    font-size: 14px;
    line-height: 1.55;
}

.iza-chat-message-bot .iza-chat-message-bubble {
    border-bottom-left-radius: 5px;
    background: #ffffff;
    color: #27352a;
    box-shadow: 0 5px 18px rgba(37, 63, 42, 0.08);
}

.iza-chat-message-user .iza-chat-message-bubble {
    border-bottom-right-radius: 5px;
    background: #42664a;
    color: #ffffff;
}

.iza-chat-message::before,
.iza-chat-message-bubble::before,
.iza-chat-message::after,
.iza-chat-message-bubble::after {
    content: none !important;
    display: none !important;
}

@keyframes izaMessageIn {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   SVARKNAPPER
========================================================= */

.iza-chat-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 205px;
    overflow-y: auto;
    padding: 5px 17px 16px;
}

.iza-chat-choice {
    padding: 10px 13px;
    border: 1px solid rgba(66, 102, 74, 0.24);
    border-radius: 999px;
    background: #ffffff;
    color: #34503a;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.iza-chat-choice:hover {
    border-color: #42664a;
    background: #42664a;
    color: #ffffff;
    transform: translateY(-1px);
}

/* =========================================================
   ANBEFALING
========================================================= */

.iza-chat-result {
    width: 100%;
    padding: 18px;
    border: 1px solid rgba(66, 102, 74, 0.18);
    border-radius: 20px;
    background:
        radial-gradient(
            circle at top right,
            rgba(132, 168, 139, 0.2),
            transparent 35%
        ),
        #ffffff;
    box-shadow: 0 8px 25px rgba(37, 63, 42, 0.09);
    animation: izaMessageIn 0.3s ease;
}

.iza-chat-result-label {
    display: inline-block;
    margin-bottom: 8px;
    color: #5f7c65;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.iza-chat-result h3 {
    margin: 0;
    color: #29432f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 23px;
    line-height: 1.2;
}

.iza-chat-result-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 12px 0;
    padding: 10px 0;
    border-top: 1px solid rgba(66, 102, 74, 0.12);
    border-bottom: 1px solid rgba(66, 102, 74, 0.12);
}

.iza-chat-result-details span {
    color: #67736a;
    font-size: 13px;
}

.iza-chat-result-details strong {
    flex-shrink: 0;
    color: #42664a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
}

.iza-chat-result p {
    margin: 0;
    color: #4f5c52;
    font-size: 13px;
    line-height: 1.6;
}

.iza-chat-result-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 15px;
}

.iza-chat-result-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 10px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.iza-chat-result-button:hover {
    transform: translateY(-1px);
}

.iza-chat-result-button-primary {
    background: #42664a;
    color: #ffffff;
}

.iza-chat-result-button-primary:hover {
    background: #34543b;
    color: #ffffff;
}

.iza-chat-result-button-secondary {
    border: 1px solid rgba(66, 102, 74, 0.3);
    background: #ffffff;
    color: #42664a;
}

.iza-chat-result-button-secondary:hover {
    background: #edf3ed;
    color: #42664a;
}

/* =========================================================
   FOOTER
========================================================= */

.iza-chat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 47px;
    padding: 9px 17px;
    border-top: 1px solid rgba(66, 102, 74, 0.1);
    background: #ffffff;
}

.iza-chat-footer small {
    color: #879087;
    font-size: 10px;
}

.iza-chat-restart {
    padding: 7px 10px;
    border: 0;
    border-radius: 999px;
    background: #edf3ed;
    color: #42664a;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.iza-chat-restart:hover {
    background: #dfeadf;
}

.iza-chat-restart[hidden] {
    display: none;
}

/* =========================================================
   SCROLLBAR
========================================================= */

.iza-chat-messages::-webkit-scrollbar,
.iza-chat-choices::-webkit-scrollbar {
    width: 6px;
}

.iza-chat-messages::-webkit-scrollbar-thumb,
.iza-chat-choices::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(66, 102, 74, 0.22);
}

/* =========================================================
   MOBIL
========================================================= */

@media (max-width: 600px) {
    .iza-chatbot {
        right: 12px;
        bottom: 12px;
    }

    .iza-chat-open {
        min-width: 0;
        padding: 10px;
    }

    .iza-chat-open-text {
        display: none;
    }

    .iza-chat-window {
        position: fixed;
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        height: min(680px, calc(100vh - 20px));
        border-radius: 23px;
    }

    .iza-chat-message-bubble {
        max-width: 86%;
    }

    .iza-chat-result-actions {
        grid-template-columns: 1fr;
    }
}