.account-primary-btn {
    background: #ff6c37;
    color: #fff;
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    text-transform: lowercase;
    outline: none;
    text-decoration: none;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    box-sizing: border-box;
}

.account-primary-btn:hover {
    opacity: 0.9;
}

.registry-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #334155;
    transition: color 0.2s, background 0.2s;
    margin: 0 10px;
}

.registry-fullscreen-btn:hover {
    color: #f97316;
    background: #f8fafc;
}

.chat-widget-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1300;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: #f97316;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.chat-widget-toggle:hover {
    background: #ea580c;
}

.chat-widget-toggle--link {
    text-decoration: none;
}

.chat-widget-toggle.is-active {
    background: #334155;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.35);
}

.chat-widget-toggle-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
}

.chat-widget-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.chat-widget-panel {
    position: fixed;
    right: 20px;
    bottom: 70px;
    width: 360px;
    max-width: calc(100vw - 24px);
    height: 560px;
    background: #fff;
    z-index: 2010;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.chat-widget-panel.is-open {
    display: flex;
}

.chat-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.chat-widget-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.chat-widget-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    background: #fff;
    padding: 0 8px;
    margin: 10px 0 0;
}

.chat-widget-tab {
    background: none;
    border: none;
    margin-bottom: -2px;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    font-size: 11px;
    padding: 0.75rem 0.6rem;
    cursor: pointer;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chat-widget-tab.active {
    color: #111827;
    border-bottom: 2px solid #111827;
    font-weight: 600;
}

.chat-widget-tab--chat {
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-widget-body,
.chat-widget-view,
.chat-widget-view.is-active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.chat-widget-view {
    display: none;
}

.chat-widget-view.is-active {
    display: flex;
}

.chat-widget-thread-list,
.chat-widget-messages {
    overflow-y: auto;
    scrollbar-width: thin;
}

.chat-widget-thread-list {
    flex: 1;
}

.chat-widget-thread-item {
    width: 100%;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    text-align: left;
    border: 0;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 8px 10px;
    cursor: pointer;
}

.chat-widget-thread-item.active {
    background: #f1f5f9;
}
.chat-widget-thread-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.chat-widget-thread-avatar img,
.chat-widget-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-widget-thread-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}
.chat-widget-thread-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    flex-shrink: 0;
    box-sizing: border-box;
}
.chat-widget-thread-last {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-widget-chat-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #e5e7eb;
    padding: 8px 10px;
    background: #fff;
}
.chat-widget-chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
}
.chat-widget-back-btn {
    border: 0;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}
.chat-widget-chat-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}
.chat-widget-fullscreen-btn {
    margin-left: auto;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 6px;
    color: #6b7280;
}
.chat-widget-messages {
    flex: 1;
    min-height: 0;
    padding: 10px 10px 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fafafa;
}
.chat-widget-message {
    align-self: flex-start;
    max-width: 80%;
    background: #eef2ff;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.chat-widget-message.own {
    margin-left: auto;
    background: #dcfce7;
}
.chat-widget-message-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}
.chat-widget-form {
    border-top: 1px solid #e5e7eb;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 8px;
}
.chat-widget-form textarea {
    border: 1px solid #d1d5db;
    padding: 8px;
    resize: none;
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}
.chat-widget-attach-btn {
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
}
.chat-widget-file-input {
    display: none;
}
.chat-char-counter {
    grid-column: 2 / 4;
    grid-row: 2 / 3;
    justify-self: end;
    align-self: center;
    font-size: 11px;
    color: #64748b;
}

.chat-char-counter--danger {
    color: #b91c1c;
}

.chat-widget-file-card {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border: 1px dashed #dbeafe;
    background: #fafafa;
    border-radius: 10px;
    padding: 8px;
    text-decoration: none;
    color: #0f172a;
}

button.chat-widget-file-card {
    font: inherit;
    text-align: left;
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.chat-widget-file-card:hover {
    border: 1px dashed #989898;
}

.chat-widget-message.own .chat-widget-file-card {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.chat-widget-file-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.chat-widget-file-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.chat-widget-file-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-widget-file-kind {
    font-size: 11px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.chat-widget-file-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-widget-file-size {
    font-size: 11px;
    color: #64748b;
}

.chat-widget-upload-placeholder {
    min-width: 220px;
}

.chat-widget-upload-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.chat-widget-upload-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}

.chat-widget-upload-progress-bar {
    height: 100%;
    background: #2563eb;
    border-radius: 999px;
    transition: width .15s ease;
}

.chat-widget-upload-percent {
    margin-top: 4px;
    font-size: 11px;
    color: #475569;
    text-align: right;
}
.chat-guest-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}

/* Notice styles aligned with docs callouts */
.platform-docs__info-box {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
}
.platform-docs__info-box-inner {
    display: grid;
    grid-template-columns: 24px 1fr;
    column-gap: 0.75rem;
    row-gap: 0.4rem;
    align-items: center;
}
.platform-docs__info-box-icon {
    grid-row: 1;
    grid-column: 1;
    width: 24px;
    height: 24px;
}
.platform-docs__info-box-title {
    grid-row: 1;
    grid-column: 2;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}
.platform-docs__info-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #1f2937;
}
.platform-docs__info-box-inner > p {
    grid-row: 2;
    grid-column: 2;
}
.platform-docs__info-box--note {
    background: #e9eff6;
}
.platform-docs__info-box--note .platform-docs__info-box-title {
    color: #6b83c7;
}
.chat-guest-form input,
.chat-guest-form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 14px;
    font-family: inherit;
}
.chat-guest-form textarea {
    min-height: 100px;
    resize: vertical;
}
.chat-guest-hint {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 4px;
}
.chat-guest-status {
    min-height: 18px;
    font-size: 12px;
    color: #64748b;
}
.chat-guest-status.is-error {
    color: #b91c1c;
}
.chat-guest-status.is-success {
    color: #166534;
}
