.aedr-panel {
    position: fixed;
    top: 50%;
    z-index: 99999;
    display: flex;
    align-items: stretch;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2933;
    transform: translateY(-50%);
}

.aedr-panel--right {
    right: 0;
    flex-direction: row-reverse;
}

.aedr-panel--left {
    left: 0;
}

.aedr-panel__tab {
    width: 44px;
    min-height: 178px;
    padding: 12px 8px;
    border: 0;
    color: #ffffff;
    background: #232f3e;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.aedr-panel--left .aedr-panel__tab {
    border-radius: 0 8px 8px 0;
}

.aedr-panel--right .aedr-panel__tab {
    border-radius: 8px 0 0 8px;
}

.aedr-panel__body {
    position: relative;
    width: min(320px, calc(100vw - 52px));
    padding: 22px;
    border: 1px solid #d8dee9;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
    transform: translateX(100%);
    transition: transform 180ms ease;
}

.aedr-panel--left .aedr-panel__body {
    transform: translateX(-100%);
}

.aedr-panel.is-open .aedr-panel__body {
    transform: translateX(0);
}

.aedr-panel__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5b6675;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.aedr-panel__close:hover,
.aedr-panel__close:focus {
    color: #111827;
    background: #eef2f7;
}

.aedr-panel__title {
    margin: 0 28px 8px 0;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

.aedr-panel__description {
    margin: 0 0 16px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
}

.aedr-form {
    display: grid;
    gap: 10px;
}

.aedr-superchat {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
}

.aedr-superchat:empty {
    display: none;
}

.aedr-superchat__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-height: 38px;
    padding: 9px 10px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.aedr-superchat__item--red {
    background: #d92d20;
}

.aedr-superchat__item--green {
    background: #12805c;
}

.aedr-superchat__item--orange {
    background: #e67912;
}

.aedr-superchat__message {
    min-width: 0;
    overflow-wrap: anywhere;
}

.aedr-superchat__promo-link {
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.aedr-superchat__promo-link:hover,
.aedr-superchat__promo-link:focus {
    color: #ffffff !important;
    text-decoration-thickness: 2px;
}

.aedr-donation-box {
    box-sizing: border-box;
    width: 100%;
}

.aedr-form__email {
    margin: 0 0 10px;
    color: #374151;
    font-size: 13px;
    line-height: 1.55;
}

.aedr-form__email a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: underline;
}

.aedr-form__notice {
    margin: 0 0 14px;
    color: #d92d20;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

.aedr-form__purchase {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #9ca3af;
    border-radius: 6px;
    color: #111827;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.12);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
}

.aedr-form__purchase:hover,
.aedr-form__purchase:focus {
    color: #111827;
    background: #f3f4f6;
    border-color: #6b7280;
    text-decoration: none;
}

.aedr-form__label {
    color: #243447;
    font-size: 13px;
    font-weight: 700;
}

.aedr-form__optional {
    color: #6b7280;
    font-size: 12px;
    font-weight: 400;
}

.aedr-form__help {
    margin: -4px 0 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

.aedr-form__input,
.aedr-form__textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #b9c2cf;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    font-size: 16px;
    letter-spacing: 0;
}

.aedr-form__input {
    min-height: 44px;
}

.aedr-form__manual-amount {
    display: grid;
    gap: 6px;
}

.aedr-form__manual-amount[hidden] {
    display: none;
}

.aedr-form__textarea {
    min-height: 84px;
    resize: vertical;
}

.aedr-form__input:focus,
.aedr-form__textarea:focus {
    border-color: #ff9900;
    outline: 3px solid rgba(255, 153, 0, 0.22);
}

.aedr-form__submit {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    color: #111827;
    background: #ff9900;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}

.aedr-form__submit:hover,
.aedr-form__submit:focus {
    background: #f3a321;
}

.aedr-form__submit:disabled {
    cursor: wait;
    opacity: 0.72;
}

.aedr-form__message {
    min-height: 20px;
    margin: 0;
    color: #256f3a;
    font-size: 13px;
    line-height: 1.45;
}

.aedr-form__message.is-error {
    color: #b42318;
}

@media (max-width: 640px) {
    .aedr-panel {
        top: auto;
        right: 0;
        bottom: 16px;
        left: auto;
        transform: none;
    }

    .aedr-panel--left {
        left: 0;
        right: auto;
    }

    .aedr-panel__tab {
        min-height: 148px;
    }
}
