/* Shared presentation for lobby, room and widget. State changes remain in JS. */
body .chat-lobby-logo-icon {
    color:#fff;
    font-size:1.3rem;
}

body .chat-tab-create {
    background:linear-gradient(135deg,#1e40af,#3b82f6);
}

body .chat-tab-join {
    background:linear-gradient(135deg,#0f172a,#334155);
}

body .chat-field-spacing {
    margin-bottom:12px;
}

body .chat-section-spacing {
    margin:20px 0;
}

body .chat-join-error {
    display:none;
    color:#dc2626;
    font-size:0.85rem;
    margin-top:10px;
    text-align:center;
    font-weight:600;
}

body .chat-join-row {
    display:flex;
    gap:8px;
    align-items:center;
}

body .chat-join-code {
    flex:1;
    margin-bottom:0;
}

body .chat-qr-scan-button {
    flex-shrink:0;
    width:48px;
    height:48px;
    border-radius:12px;
    border:2px solid #e2e8f0;
    background:#f8fafc;
    color:#3b82f6;
    font-size:1.1rem;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all 0.2s;
}

body .chat-qr-modal {
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.75);
    z-index:99999;
    align-items:center;
    justify-content:center;
    padding:16px;
}

body .chat-qr-panel {
    background:#0f172a;
    border-radius:20px;
    width:100%;
    max-width:420px;
    padding:20px;
    border:1px solid rgba(255,255,255,0.1);
    box-shadow:0 24px 48px rgba(0,0,0,0.5);
}

body .chat-qr-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:16px;
}

body .chat-qr-title {
    display:flex;
    align-items:center;
    gap:10px;
    color:#f8fafc;
    font-weight:700;
    font-size:1rem;
}

body .chat-text-blue {
    color:#3b82f6;
}

body .chat-qr-close {
    background:rgba(255,255,255,0.08);
    border:none;
    color:#94a3b8;
    width:32px;
    height:32px;
    border-radius:50%;
    cursor:pointer;
    font-size:1rem;
    display:flex;
    align-items:center;
    justify-content:center;
}

body .chat-qr-preview {
    position:relative;
    border-radius:14px;
    overflow:hidden;
    background:#000;
    aspect-ratio:1;
}

body .chat-qr-video {
    width:100%;
    height:100%;
    object-fit:cover;
}

body .chat-qr-guide {
    position:absolute;
    inset:0;
    pointer-events:none;
}

body .chat-qr-corner-top-left {
    position:absolute;
    top:20px;
    left:20px;
    width:40px;
    height:40px;
    border-top:3px solid #3b82f6;
    border-left:3px solid #3b82f6;
    border-radius:4px 0 0 0;
}

body .chat-qr-corner-top-right {
    position:absolute;
    top:20px;
    right:20px;
    width:40px;
    height:40px;
    border-top:3px solid #3b82f6;
    border-right:3px solid #3b82f6;
    border-radius:0 4px 0 0;
}

body .chat-qr-corner-bottom-left {
    position:absolute;
    bottom:20px;
    left:20px;
    width:40px;
    height:40px;
    border-bottom:3px solid #3b82f6;
    border-left:3px solid #3b82f6;
    border-radius:0 0 0 4px;
}

body .chat-qr-corner-bottom-right {
    position:absolute;
    bottom:20px;
    right:20px;
    width:40px;
    height:40px;
    border-bottom:3px solid #3b82f6;
    border-right:3px solid #3b82f6;
    border-radius:0 0 4px 0;
}

body .chat-hidden {
    display:none;
}

body .chat-qr-status {
    text-align:center;
    color:#64748b;
    font-size:0.85rem;
    margin-top:14px;
    margin-bottom:0;
}

body .chat-join-logo {
    width:48px;
    height:48px;
    background:linear-gradient(135deg,#1e40af,#3b82f6);
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 auto 16px;
}

body .chat-join-logo-icon {
    color:#fff;
    font-size:1.1rem;
}

body .chat-join-hint {
    font-size:.72rem;
    color:#94a3b8;
    margin-top:12px;
    margin-bottom:0;
}

body .chat-text-green {
    color:#22c55e;
}

body .chat-home-link {
    text-decoration:none;
    justify-content:center;
    margin-bottom:15px;
    background:rgba(255,255,255,0.1);
    color:#fff;
    font-weight:600;
}

body .chat-text-light-blue {
    color:#60a5fa;
}

body .chat-sidebar-lock {
    color:#fff;
    font-size:.9rem;
}

body .chat-copy-confirmation {
    color:#22c55e;
    display:none;
    margin-left:auto;
}

body .chat-my-rooms {
    display:none;
    padding-bottom:12px;
}

body .chat-sidebar-action {
    padding:14px 20px;
    border-top:1px solid rgba(255,255,255,.06);
}

body .chat-leave-button {
    width:100%;
    background:#0f172a;
    color:#fff;
    border:none;
    border-radius:10px;
    padding:10px;
    cursor:pointer;
    font-weight:600;
}

body .chat-delete-button {
    width:100%;
    background:#ef4444;
    color:#fff;
    border:none;
    border-radius:10px;
    padding:10px;
    cursor:pointer;
    font-weight:600;
}

body .chat-header-actions {
    display:flex;
    align-items:center;
    gap:10px;
}

body .chat-flex-fill {
    flex:1;
}

body .chat-upload-name {
    font-size:.75rem;
    margin-bottom:4px;
}

body .chat-deleted-message {
    background:transparent;
    border:1px solid #cbd5e1;
    color:#94a3b8;
    font-style:italic;
}

body .chat-message-own-label {
    text-align:right;
}

body .chat-text-muted {
    color:#64748b;
}

body .chat-text-amber {
    color:#f59e0b;
}

body .chat-file-available {
    background:linear-gradient(135deg,#15803d,#22c55e);
}

body .chat-widget-lobby {
    gap:12px;
    padding:16px;
}

body .chat-widget-intro {
    text-align:center;
    margin-bottom:4px;
}

body .chat-widget-lock {
    font-size:1.8rem;
    color:#3b82f6;
}

body .chat-widget-heading {
    margin:6px 0 2px;
}

body .chat-widget-subtitle {
    font-size:.75rem;
    color:#64748b;
    margin:0;
}

body .chat-widget-label {
    font-size:.7rem;
    font-weight:600;
    color:#475569;
    margin-bottom:4px;
    display:block;
}

body .chat-widget-input {
    padding:8px 12px;
}

body .chat-widget-verify-button {
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 14px;
    background:#f8fafc;
    border:1.5px solid #e2e8f0;
    border-radius:12px;
    cursor:pointer;
    font-family:'Inter',sans-serif;
    font-size:0.85rem;
    font-weight:500;
    color:#374151;
    transition:all 0.25s;
}

body .chat-widget-verify-icon {
    width:28px;
    height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#e2e8f0;
    border-radius:6px;
    color:#64748b;
    font-size:0.9rem;
    flex-shrink:0;
}

body .chat-widget-verify-text {
    flex:1;
    text-align:left;
}

body .chat-widget-chevron {
    color:#94a3b8;
    font-size:0.75rem;
}

body .chat-widget-actions {
    background:#f1f5f9;
    padding:12px;
    border-radius:12px;
    display:flex;
    flex-direction:column;
    gap:8px;
}

body .chat-widget-create-button {
    padding:10px;
}

body .chat-widget-divider-row {
    display:flex;
    align-items:center;
    gap:8px;
    margin:4px 0;
}

body .chat-widget-divider-line {
    flex:1;
    height:1px;
    background:#e2e8f0;
}

body .chat-widget-divider-text {
    font-size:0.7rem;
    font-weight:700;
    color:#94a3b8;
}

body .chat-widget-join-row {
    display:flex;
    gap:8px;
}

body .chat-widget-room-code {
    text-transform:uppercase;
    flex:1;
    padding:8px 12px;
    min-width:0;
}

body .chat-widget-scan-button {
    flex-shrink:0;
    width:40px;
    height:40px;
    border-radius:8px;
    border:1px solid #cbd5e1;
    background:#f8fafc;
    color:#3b82f6;
    font-size:1rem;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all 0.2s;
}

body .chat-widget-join-button {
    background:#0f172a;
    width:auto;
    padding:0 16px;
    white-space:nowrap;
}

body .chat-widget-captcha-modal {
    display:none;
    position:absolute;
    inset:0;
    z-index:50;
}

body .chat-widget-captcha-backdrop {
    position:absolute;
    inset:0;
    background:rgba(15,23,42,0.65);
    backdrop-filter:blur(4px);
}

body .chat-widget-captcha-panel {
    position:relative;
    z-index:1;
    margin:auto 12px;
    background:#fff;
    border-radius:16px;
    box-shadow:0 20px 60px rgba(0,0,0,0.25);
    overflow:hidden;
}

body .chat-widget-captcha-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 18px;
    background:#f8fafc;
    border-bottom:1px solid #e2e8f0;
    font-size:0.9rem;
    font-weight:600;
    color:#0f172a;
}

body .chat-widget-captcha-title {
    display:flex;
    align-items:center;
    gap:8px;
}

body .chat-widget-captcha-close {
    background:none;
    border:none;
    color:#94a3b8;
    font-size:1.1rem;
    cursor:pointer;
    padding:4px;
}

body .chat-widget-captcha-body {
    padding:20px 12px;
    display:flex;
    justify-content:center;
}

body .chat-widget-room-bar {
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 16px;
    background:#f1f5f9;
    border-bottom:1px solid #e2e8f0;
}

body .chat-widget-code-label {
    font-size:0.75rem;
    font-weight:600;
    color:#64748b;
    margin-bottom:4px;
}

body .chat-widget-code-value {
    font-size:1.25rem;
    letter-spacing:1px;
    font-family:monospace;
    font-weight:800;
    color:#0f172a;
}

body .chat-widget-copy-button {
    background:#dbeafe;
    border:none;
    padding:6px 10px;
    border-radius:6px;
    cursor:pointer;
    color:#2563eb;
    font-size:0.8rem;
    font-weight:700;
    transition:background 0.2s;
}

body .chat-widget-leave-button {
    background:#0f172a;
    border:none;
    padding:6px 10px;
    border-radius:6px;
    cursor:pointer;
    color:#fff;
    font-size:0.8rem;
    font-weight:700;
    transition:background 0.2s;
}

body .chat-widget-delete-button {
    background:#ef4444;
    border:none;
    padding:6px 10px;
    border-radius:6px;
    cursor:pointer;
    color:#fff;
    font-size:0.8rem;
    font-weight:700;
    transition:background 0.2s;
}

body .chat-widget-qr-modal {
    display:none;
    position:absolute;
    inset:0;
    background:rgba(255,255,255,0.98);
    z-index:20;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

body .chat-widget-qr-close {
    position:absolute;
    top:20px;
    right:20px;
    background:none;
    border:none;
    font-size:1.5rem;
    cursor:pointer;
    color:#64748b;
}

body .chat-widget-qr-heading {
    margin:0 0 20px 0;
    color:#0f172a;
}

body .chat-widget-qr-image {
    border-radius:12px;
    border:2px solid #e2e8f0;
    background:#fff;
    padding:10px;
    box-shadow:0 8px 24px rgba(0,0,0,0.1);
}

body .chat-widget-warning {
    background:#f59e0b;
}

body .chat-widget-footer {
    background:#fff;
    border-top:1px solid #e2e8f0;
    padding:12px 16px;
}

body .chat-widget-file-name {
    font-size:.75rem;
    margin-bottom:2px;
}

body .chat-widget-file-caption {
    font-size:.7rem;
    font-weight:600;
}

body .chat-widget-composer {
    display:flex;
    gap:8px;
    align-items:flex-end;
}

body .chat-widget-danger {
    background:#ef4444;
}

body .chat-widget-deleted-message {
    background:transparent;
    border:1px solid #cbd5e1;
    color:#94a3b8;
    font-style:italic;
    font-size:0.75rem;
}

body .chat-widget-message-name {
    font-size:0.7rem;
    margin-bottom:4px;
}

body .chat-widget-message-actions {
    display:flex;
    gap:6px;
}

body .chat-widget-file-waiting {
    font-size:0.7rem;
    color:#f59e0b;
}

body .chat-widget-file-ready {
    background:#dcfce7;
    color:#16a34a;
}

body .chat-widget-scan-modal {
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.75);
    z-index:9999999;
    align-items:center;
    justify-content:center;
    padding:16px;
}

body .chat-qr-scan-button:hover,
body .chat-qr-scan-button:focus-visible,
body .chat-widget-scan-button:hover,
body .chat-widget-scan-button:focus-visible {
    background: #3b82f6;
    color: #fff;
}
