/* Lille rund knap nederst til højre */
.dietz-chat-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;              /* lidt større knap */
    height: 60px;
    border-radius: 50%;
    border: 2px solid #22c55e; /* grøn ring som logo-farven */
    cursor: pointer;
    font-size: 30px;           /* større ikon/emoji */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35); /* lidt kraftigere skygge */
    background: #020617;       /* lidt mørkere baggrund */
    color: #f9fafb;
    z-index: 9999;
}


/* Selve chat-vinduet */
.dietz-chat-panel {
    position: fixed;
    right: 20px;
    bottom: 84px;            /* lidt over knappen */
    width: 340px;

    /* 20% lavere end før (420px -> ca. 336px) */
    height: 336px;
    max-height: 60vh;

    background: #020617;
    color: #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
    overflow: hidden;        /* ALT indhold klippes inde i boksen */
    z-index: 9999;
    border: 1px solid rgba(148,163,184,0.4);

    display: block;
}

/* På mobil må den gerne fylde næsten hele bredden */
@media (max-width: 600px) {
    .dietz-chat-panel {
        left: 8px;
        right: 8px;
        width: auto;
        bottom: 80px;

        height: 300px;   /* også lidt lavere på mobil */
        max-height: 60vh;
    }
}

/* Header-linjen – fast øverst i panelet */
.dietz-chat-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    background: #020617;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid rgba(148,163,184,0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dietz-chat-close {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
}

/* Liste med beskeder – fylder ALT imellem header og input */
.dietz-chat-messages {
    position: absolute;
    left: 0;
    right: 0;

    /* plads til header + input-form */
    top: 44px;        /* ca. header-højde */
    bottom: 56px;     /* matcher input-områdets højde */

    overflow-y: auto;
    padding: 8px 4px 4px;
    margin: 0;
    background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 100%);
}

/* En enkelt besked-wrapper */
.dietz-chat-message {
    margin: 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Beskeder fra kunden (Dig) skubbes til højre */
.dietz-chat-message.me {
    align-items: flex-end;
}

/* Label “Dig:” / “Dietzcc:” */
.dietz-chat-message-label {
    font-size: 12px;
    color: #e5e7eb;
    margin-bottom: 2px;
}

/* Selve boblen */
.dietz-chat-message-text {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 12px;
    background: #111827;
    max-width: 80%;
    font-size: 13px;
    line-height: 1.3;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Boble-farve for “Dig” */
.dietz-chat-message.me .dietz-chat-message-text {
    background: #0f766e;
}

/* Input-område – altid fast nederst i panelet, lavt og pænt */
.dietz-chat-form {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 56px;  /* samlet højde for input + knap */
    border-top: 1px solid rgba(148,163,184,0.35);
    padding: 6px 8px;
    display: flex;
    gap: 6px;
    align-items: stretch;     /* gør børn lige høje */
    background: #020617;
}

/* Selve input-feltet – FAST højde, intern scroll ved lange beskeder */
.dietz-chat-input {
    flex: 1;
    resize: none;
    border-radius: 8px;
    padding: 4px 8px;
    border: 1px solid #4b5563;
    background: #020617;
    color: #e5e7eb;
    font-size: 13px;

    height: 100% !important;      /* må IKKE vokse */
    max-height: 100% !important;  /* låst til form-højden */
    overflow-y: auto !important;  /* scroll inde i feltet */
    line-height: 1.3;
    box-sizing: border-box;
}

.dietz-chat-input:focus {
    outline: none;
    border-color: #22c55e;
}

/* (Valgfrit) lidt pænere scrollbar i inputfeltet */
.dietz-chat-input::-webkit-scrollbar {
    width: 6px;
}
.dietz-chat-input::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}
.dietz-chat-input::-webkit-scrollbar-track {
    background: transparent;
}

/* Send-knap – samme højde som input */
.dietz-chat-send {
    padding: 0 12px;
    border-radius: 8px;
    border: none;
    background: #22c55e;
    color: #020617;
    font-size: 12px;
    cursor: pointer;

    height: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dietz-chat-send:disabled {
    opacity: 0.4;
    cursor: default;
}

.dietz-chat-status {
    font-size: 11px;
    color: #9ca3af;
    padding: 4px 10px 6px;
}
