.mydreamday-chat {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9998;
    font-family: Arial, sans-serif;
}

.mydreamday-chat__launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #33353a;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(72, 177, 106, 0.18);
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.mydreamday-chat__launcher:hover {
    transform: translateY(-1px);
}

.mydreamday-chat--offline .mydreamday-chat__launcher {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(189, 91, 91, 0.16);
}

.mydreamday-chat__panel {
    position: absolute;
    left: 0;
    bottom: 76px;
    width: 340px;
    max-width: calc(100vw - 32px);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.mydreamday-chat__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 20px;
    background: #2f2f32;
    color: #fff;
}

.mydreamday-chat__agent {
    display: block;
    font-size: 18px;
}

.mydreamday-chat__status {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.mydreamday-chat__close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.mydreamday-chat__body {
    padding: 16px;
}

.mydreamday-chat__hours,
.mydreamday-chat__privacy {
    margin: 0 0 12px;
    font-size: 13px;
    color: #5e6675;
}

.mydreamday-chat__messages {
    min-height: 86px;
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 12px;
    display: grid;
    gap: 10px;
}

.mydreamday-chat__message {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f5f7fb;
    font-size: 14px;
    line-height: 1.45;
}

.mydreamday-chat__message--customer {
    justify-self: end;
    background: #33353a;
    color: #fff;
}

.mydreamday-chat__message--agent {
    justify-self: start;
    background: #eef0f2;
}

.mydreamday-chat__message-meta {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    opacity: 0.75;
}

.mydreamday-chat__system {
    margin-bottom: 12px;
}

.mydreamday-chat__message--system {
    max-width: 100%;
    background: #f5f7fb;
}

.mydreamday-chat__form {
    display: grid;
    gap: 10px;
}

.mydreamday-chat__email-wrap[hidden] {
    display: none;
}

.mydreamday-chat__input,
.mydreamday-chat__textarea {
    width: 100%;
    border: 1px solid #d9deea;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    box-sizing: border-box;
}

.mydreamday-chat__textarea {
    min-height: 96px;
    resize: vertical;
}

.mydreamday-chat__submit {
    border: 0;
    border-radius: 10px;
    padding: 12px 16px;
    background: #33353a;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.mydreamday-chat__icon {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mydreamday-chat__icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.mydreamday-chat__icon--close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

.mydreamday-chat.is-open .mydreamday-chat__icon--bubble {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

.mydreamday-chat.is-open .mydreamday-chat__icon--close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}
