/* ============================================================
   Akukita Chat with AI Translation — Frontend Styles
   Design: sleek dark-glass UI with electric accent
   ============================================================ */

/* System font stack — no external CDN dependencies (WordPress.org requirement).
 * DM Sans and JetBrains Mono are referenced as preferences; the stack falls back
 * gracefully to system UI fonts on any device. */

:root {
    --akch-bg:          #0f1117;
    --akch-surface:     #181c27;
    --akch-surface-2:   #1e2333;
    --akch-border:      rgba(255,255,255,0.07);
    --akch-accent:      #4f6ef7;
    --akch-accent-glow: rgba(79,110,247,0.35);
    --akch-accent-2:    #7c3aed;
    --akch-success:     #10b981;
    --akch-text:        #e8eaf0;
    --akch-muted:       #6b7280;
    --akch-bubble-me:   linear-gradient(135deg, #4f6ef7 0%, #7c3aed 100%);
    --akch-bubble-them: #1e2333;
    --akch-radius:      14px;
    --akch-radius-sm:   8px;
    --akch-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --akch-mono:        ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    --akch-shadow:      0 8px 32px rgba(0,0,0,0.4);
    --akch-transition:  0.18s ease;
}

/* ── Reset ── */
#akch-app, #akch-app * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Root Container ── */
#akch-app {
    font-family: var(--akch-font);
    font-size: 14px;
    color: var(--akch-text);
    background: var(--akch-bg);
    border-radius: var(--akch-radius);
    overflow: hidden;
    display: flex;
    height: var(--chat-height, 600px);
    box-shadow: var(--akch-shadow), 0 0 0 1px var(--akch-border);
    position: relative;
}

/* ── Sidebar ── */
.akch-sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--akch-surface);
    border-right: 1px solid var(--akch-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.akch-sidebar-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--akch-border);
    background: rgba(79,110,247,0.06);
}

.akch-logo { font-size: 20px; }

.akch-title {
    font-weight: 600;
    font-size: 15px;
    flex: 1;
    background: linear-gradient(90deg, var(--akch-accent), var(--akch-accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.akch-btn-icon {
    background: none;
    border: 1px solid var(--akch-border);
    color: var(--akch-muted);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--akch-transition);
    flex-shrink: 0;
}
.akch-btn-icon:hover {
    background: var(--akch-accent);
    border-color: var(--akch-accent);
    color: #fff;
    box-shadow: 0 0 12px var(--akch-accent-glow);
}

/* ── Language Selector ── */
.akch-lang-selector {
    padding: 12px 16px;
    border-bottom: 1px solid var(--akch-border);
}
.akch-lang-selector label {
    display: block;
    font-size: 11px;
    color: var(--akch-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.akch-select {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--akch-border);
    color: #1a1a1a;
    border-radius: var(--akch-radius-sm);
    padding: 6px 10px;
    font-family: var(--akch-font);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: border-color var(--akch-transition);
    -webkit-appearance: menulist;
            appearance: menulist;
}
.akch-select:focus {
    border-color: var(--akch-accent);
}
/* Force readable colours in the dropdown across OS themes.
   Without this, native browser themes (especially dark mode on macOS / Linux)
   render options with white-on-white or black-on-black combinations. */
.akch-select option {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* ── Room List ── */
.akch-room-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--akch-border) transparent;
}
.akch-room-list::-webkit-scrollbar { width: 4px; }
.akch-room-list::-webkit-scrollbar-thumb { background: var(--akch-border); border-radius: 2px; }

.akch-room-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 0;
    transition: background var(--akch-transition);
    position: relative;
}
.akch-room-item:hover { background: rgba(255,255,255,0.04); }
.akch-room-item.active {
    background: rgba(79,110,247,0.12);
}
.akch-room-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--akch-accent);
    border-radius: 0 2px 2px 0;
}

.akch-room-icon {
    font-size: 14px;
    color: var(--akch-muted);
    font-family: var(--akch-mono);
    width: 16px;
    text-align: center;
}
.akch-room-item.active .akch-room-icon { color: var(--akch-accent); }

.akch-room-name {
    flex: 1;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--akch-muted);
    truncate: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.akch-room-item.active .akch-room-name { color: var(--akch-text); }

.akch-unread {
    background: var(--akch-accent);
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
}

/* ── Chat Main ── */
.akch-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--akch-bg);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(79,110,247,0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(124,58,237,0.04) 0%, transparent 50%);
}

/* ── Header ── */
.akch-chat-header {
    padding: 14px 20px;
    background: var(--akch-surface);
    border-bottom: 1px solid var(--akch-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.akch-room-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.akch-room-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--akch-text);
}

.akch-translate-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(16,185,129,0.12);
    color: var(--akch-success);
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.akch-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.akch-inline-lang {
    width: auto;
    min-width: 130px;
    font-size: 12px;
    padding: 4px 8px;
}

/* ── Participants ── */
.akch-participants {
    display: flex;
    align-items: center;
    gap: -4px;
    flex-wrap: wrap;
    gap: 4px;
}

.akch-participant-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--akch-accent), var(--akch-accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border: 2px solid var(--akch-bg);
    cursor: default;
    position: relative;
    flex-shrink: 0;
}
.akch-participant-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--akch-success);
    border: 1.5px solid var(--akch-bg);
}
.akch-participant-lang {
    font-size: 10px;
    background: var(--akch-surface-2);
    border: 1px solid var(--akch-border);
    border-radius: 4px;
    padding: 2px 5px;
    color: var(--akch-muted);
    font-family: var(--akch-mono);
}

/* ── Messages Area ── */
.akch-messages-wrap {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
    scroll-behavior: smooth;
}
.akch-messages-wrap::-webkit-scrollbar { width: 5px; }
.akch-messages-wrap::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}

.akch-messages {
    padding: 20px 20px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 100%;
}

/* ── Empty State ── */
.akch-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--akch-muted);
    text-align: center;
    padding: 40px;
}
.akch-empty-icon { font-size: 48px; opacity: 0.5; }
.akch-empty-state p { font-size: 14px; max-width: 220px; line-height: 1.5; }

/* ── Date Divider ── */
.akch-date-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--akch-muted);
    font-size: 11px;
}
.akch-date-divider::before,
.akch-date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--akch-border);
}

/* ── Message ── */
.akch-message {
    display: flex;
    gap: 10px;
    animation: akch-slide-in 0.2s ease;
    max-width: 100%;
    padding: 2px 0;
}

@keyframes akch-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.akch-message.is-mine {
    flex-direction: row-reverse;
}

.akch-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f6ef7, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    margin-top: 2px;
}

.akch-message-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: calc(100% - 110px);
}

.akch-message.is-mine .akch-message-body {
    align-items: flex-end;
}

.akch-message-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 11px;
}

.akch-message.is-mine .akch-message-meta {
    flex-direction: row-reverse;
}

.akch-sender-name {
    font-weight: 600;
    color: var(--akch-text);
    font-size: 12px;
}

.akch-message-time {
    color: var(--akch-muted);
    font-size: 10px;
    font-family: var(--akch-mono);
}

.akch-bubble {
    padding: 10px 14px;
    border-radius: var(--akch-radius);
    line-height: 1.55;
    word-break: break-word;
    position: relative;
    max-width: 100%;
}

.akch-message:not(.is-mine) .akch-bubble {
    background: var(--akch-bubble-them);
    border: 1px solid var(--akch-border);
    border-bottom-left-radius: 4px;
    color: var(--akch-text);
}

.akch-message.is-mine .akch-bubble {
    background: var(--akch-bubble-me);
    border-bottom-right-radius: 4px;
    color: #fff;
    box-shadow: 0 4px 16px var(--akch-accent-glow);
}

/* ── Translation Toggle ── */
.akch-translation-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.akch-translation-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--akch-muted);
    background: var(--akch-surface-2);
    border: 1px solid var(--akch-border);
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    transition: all var(--akch-transition);
    user-select: none;
}
.akch-translation-tag:hover {
    border-color: var(--akch-accent);
    color: var(--akch-accent);
}

.akch-original-text {
    font-size: 12px;
    color: var(--akch-muted);
    font-style: italic;
    display: none;
    padding: 4px 8px;
    border-left: 2px solid var(--akch-accent);
    margin-top: 4px;
    line-height: 1.4;
}
.akch-original-text.visible { display: block; }

/* ── Input Area ── */
.akch-input-area {
    padding: 12px 16px 14px;
    background: var(--akch-surface);
    border-top: 1px solid var(--akch-border);
    flex-shrink: 0;
}

.akch-input-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.akch-message-input {
    flex: 1;
    background: #ffffff;
    border: 1px solid var(--akch-border);
    border-radius: var(--akch-radius);
    padding: 10px 14px;
    color: #1a1a1a;
    font-family: var(--akch-font);
    font-size: 14px;
    resize: none;
    outline: none;
    min-height: 44px;
    max-height: 120px;
    line-height: 1.5;
    transition: border-color var(--akch-transition), box-shadow var(--akch-transition);
    scrollbar-width: thin;
}
.akch-message-input:focus {
    border-color: var(--akch-accent);
    box-shadow: 0 0 0 3px rgba(79,110,247,0.15);
}
/* Placeholder needs an explicit grey — using var(--akch-muted) here would
   render almost invisible on the new white background. */
.akch-message-input::placeholder { color: #8c8c95; opacity: 1; }
.akch-message-input::-webkit-input-placeholder { color: #8c8c95; opacity: 1; }
.akch-message-input::-moz-placeholder { color: #8c8c95; opacity: 1; }
.akch-message-input:disabled { opacity: 0.5; cursor: not-allowed; }

.akch-send-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--akch-radius);
    background: var(--akch-accent);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--akch-transition);
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--akch-accent-glow);
}
.akch-send-btn:hover:not(:disabled) {
    background: #3d5ce8;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--akch-accent-glow);
}
.akch-send-btn:active { transform: scale(0.96); }
.akch-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.akch-input-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 11px;
    color: var(--akch-muted);
    min-height: 16px;
}

.akch-powered-by {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.5;
}

.akch-typing {
    color: var(--akch-accent);
    font-style: italic;
    animation: akch-pulse 1.4s ease infinite;
}
@keyframes akch-pulse {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

/* ── Load More ── */
.akch-load-more {
    text-align: center;
    padding: 8px;
    margin-bottom: 8px;
}
.akch-load-more button {
    background: none;
    border: 1px solid var(--akch-border);
    color: var(--akch-muted);
    border-radius: var(--akch-radius-sm);
    padding: 6px 14px;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--akch-transition);
}
.akch-load-more button:hover {
    border-color: var(--akch-accent);
    color: var(--akch-accent);
}

/* ── Modal ── */
.akch-modal {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: akch-fade-in 0.15s ease;
}
@keyframes akch-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.akch-modal-content {
    background: var(--akch-surface);
    border: 1px solid var(--akch-border);
    border-radius: var(--akch-radius);
    padding: 24px;
    min-width: 320px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: akch-slide-up 0.2s ease;
}
@keyframes akch-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.akch-modal-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--akch-text);
    margin-bottom: 20px;
}

.akch-field {
    margin-bottom: 16px;
}
.akch-field label {
    display: block;
    font-size: 12px;
    color: var(--akch-muted);
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.akch-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--akch-border);
    border-radius: var(--akch-radius-sm);
    padding: 9px 12px;
    color: #1a1a1a;
    font-family: var(--akch-font);
    font-size: 14px;
    outline: none;
    transition: border-color var(--akch-transition);
}
.akch-input:focus { border-color: var(--akch-accent); }
.akch-input::placeholder { color: #8c8c95; opacity: 1; }

.akch-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.akch-btn {
    padding: 9px 20px;
    border-radius: var(--akch-radius-sm);
    font-family: var(--akch-font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--akch-transition);
    border: none;
}
.akch-btn-primary {
    background: var(--akch-accent);
    color: #fff;
    box-shadow: 0 4px 12px var(--akch-accent-glow);
}
.akch-btn-primary:hover { background: #3d5ce8; transform: translateY(-1px); }
.akch-btn-secondary {
    background: var(--akch-surface-2);
    color: var(--akch-muted);
    border: 1px solid var(--akch-border);
}
.akch-btn-secondary:hover { color: var(--akch-text); border-color: var(--akch-text); }

/* ── Login notice ── */
.akch-login-notice {
    background: var(--akch-surface);
    border: 1px solid var(--akch-border);
    border-radius: var(--akch-radius);
    padding: 20px 24px;
    color: var(--akch-muted);
    font-family: var(--akch-font);
}
.akch-login-notice a { color: var(--akch-accent); }

/* ── Responsive ── */
@media (max-width: 640px) {
    .akch-sidebar { display: none; }
    .akch-message-body { max-width: calc(100% - 50px); }
}

/* ── Single room variant ── */
.akch-single-room .akch-chat-main { width: 100%; }

/* ── Clickable sender names (opens DM) ── */
.akch-sender-clickable {
    cursor: pointer;
    transition: color var(--akch-transition);
}
.akch-sender-clickable:hover {
    color: var(--akch-accent);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.akch-avatar-clickable {
    cursor: pointer;
    transition: transform var(--akch-transition), box-shadow var(--akch-transition);
}
.akch-avatar-clickable:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 3px var(--akch-accent-glow);
}

/* Tooltip on hover */
.akch-avatar-clickable::before {
    content: attr(title);
    display: none;
}

/* ── Sidebar section labels ── */
.akch-sidebar-section-label {
    padding: 10px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--akch-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

/* ── Premium upsell elements ─────────────────────────────────────────────── */
.akch-upsell-dm-block {
    padding: 10px 16px 14px;
}
.akch-upsell-desc {
    font-size: 12px;
    color: var(--akch-muted);
    margin: 0 0 8px;
    line-height: 1.5;
}
.akch-upsell-btn {
    display: inline-block;
    padding: 6px 14px;
    background: var(--akch-accent);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: opacity var(--akch-transition);
}
.akch-upsell-btn:hover {
    opacity: 0.85;
    color: #fff;
}
.akch-upsell-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--akch-accent);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}
.akch-upsell-badge:hover {
    opacity: 0.85;
    color: #fff;
}

/* ── Registration modal styles (from register-modal.php) ────────────────── */

@keyframes akch-spin { to { transform: rotate(360deg); } }
@keyframes akch-auth-in {
    from { opacity:0; transform:translateY(28px) scale(0.97); }
    to   { opacity:1; transform:none; }
}

.akch-auth-modal {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--akch-bg, #0f1117);
}

.akch-auth-card {
    background: #181c27;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 36px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(79,110,247,0.12);
    animation: akch-auth-in 0.3s cubic-bezier(0.34,1.2,0.64,1) forwards;
    color: #e8eaf0;
}

.akch-auth-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.akch-auth-logo { flex-shrink: 0; margin-top: 2px; }
.akch-auth-title {
    font-size: 21px !important;
    font-weight: 800 !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    border: none !important;
    background: linear-gradient(90deg, #4f6ef7, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2 !important;
}
.akch-auth-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5;
}

/* Tabs */
.akch-auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}
.akch-auth-tab {
    flex: 1;
    padding: 8px 12px;
    background: none;
    border: none;
    color: #6b7280;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s;
}
.akch-auth-tab.active {
    background: #1e2333;
    color: #e8eaf0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Panels */
.akch-auth-panel { display: flex; flex-direction: column; gap: 16px; }
.akch-hidden { display: none; }

/* Fields */
.akch-auth-field { display: flex; flex-direction: column; gap: 5px; }
.akch-auth-field label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #9ca3af !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 !important;
    padding: 0 !important;
}
.akch-auth-field-hint { font-size: 11px; color: #4b5563; line-height: 1.4; }
.akch-auth-field-error { font-size: 12px; color: #f87171; min-height: 14px; }

.akch-auth-input,
.akch-auth-select {
    background: #0f1117 !important;
    border: 1.5px solid rgba(255,255,255,0.1) !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    color: #e8eaf0 !important;
    font-size: 14px !important;
    font-family: inherit !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
    -webkit-appearance: none;
}
.akch-auth-input:focus, .akch-auth-select:focus {
    border-color: #4f6ef7 !important;
    box-shadow: 0 0 0 3px rgba(79,110,247,0.2) !important;
}
.akch-auth-input.error { border-color: #ef4444 !important; }
.akch-auth-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%236b7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 36px !important;
    cursor: pointer !important;
}
.akch-auth-select option { background: #181c27; color: #e8eaf0; }

.akch-auth-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fca5a5;
    font-size: 13px;
}
.akch-auth-success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 8px;
    padding: 10px 14px;
    color: #6ee7b7;
    font-size: 13px;
}

.akch-auth-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 13px 20px !important;
    background: linear-gradient(135deg, #4f6ef7, #7c3aed) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: 0 4px 20px rgba(79,110,247,0.35) !important;
    transition: transform 0.15s, box-shadow 0.15s !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
}
.akch-auth-btn:hover { transform: translateY(-2px) !important; box-shadow: 0 8px 28px rgba(79,110,247,0.45) !important; }
.akch-auth-btn:active { transform: scale(0.98) !important; }
.akch-auth-btn:disabled { opacity: 0.6 !important; cursor: not-allowed !important; transform: none !important; }
.akch-auth-btn-outline {
    background: transparent !important;
    border: 1.5px solid rgba(79,110,247,0.5) !important;
    color: #a5b4fc !important;
    box-shadow: none !important;
}
.akch-auth-btn-outline:hover {
    background: rgba(79,110,247,0.1) !important;
    border-color: #4f6ef7 !important;
    color: #fff !important;
}

.akch-auth-disclaimer, .akch-auth-login-info {
    font-size: 12px !important;
    color: #4b5563 !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}
.akch-auth-link {
    color: #6b7280;
    font-size: 12px;
    text-align: center;
    text-decoration: none;
    margin-top: -8px;
}
.akch-auth-link:hover { color: #a5b4fc; }

@media (max-width: 480px) {
    .akch-auth-card { padding: 28px 20px; }
}

/* ── Guest name gate (guest mode) ─────────────────────────────────────────────
   Rendered as a full-viewport fixed overlay so it always appears, regardless
   of how the host theme styles or positions the shortcode container. Themes
   like Divi often wrap shortcodes in elements with overflow:hidden, transform,
   or filter, all of which break position:absolute children. Using fixed +
   !important on the layout properties + id selector for higher specificity
   defeats those conflicts.
*/
#akch-guest-gate.akch-guest-gate{
    position:fixed !important;
    top:0 !important; right:0 !important; bottom:0 !important; left:0 !important;
    width:100vw !important;
    height:100vh !important;
    z-index:999999 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    background:rgba(15,17,23,.78) !important;
    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);
    margin:0 !important;
    padding:16px !important;
    box-sizing:border-box !important;
}
.akch-guest-gate-card{
    background:#ffffff !important;
    color:#1a1a1a !important;
    border:1px solid #e2e2e7 !important;
    border-radius:14px !important;
    padding:26px 28px !important;
    max-width:360px !important;
    width:90% !important;
    box-shadow:0 12px 40px rgba(0,0,0,.35) !important;
    text-align:left !important;
    font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.akch-guest-gate-card h3{margin:0 0 6px !important;font-size:18px !important;color:#1a1a1a !important;}
.akch-guest-gate-card p{margin:0 0 16px !important;color:#646970 !important;font-size:13px !important;}
.akch-guest-gate-card label{
    display:block !important;font-size:12px !important;font-weight:600 !important;
    margin:10px 0 4px !important;color:#3c434a !important;
}
.akch-guest-gate-card input,
.akch-guest-gate-card select{
    width:100% !important;padding:9px 11px !important;border:1px solid #d5d5db !important;
    border-radius:8px !important;font-size:14px !important;box-sizing:border-box !important;
    background:#ffffff !important;color:#1a1a1a !important;
    -webkit-appearance:menulist !important; appearance:menulist !important;
    margin:0 !important;
}
.akch-guest-gate-card select option{background:#ffffff !important;color:#1a1a1a !important;}
.akch-guest-enter{
    margin-top:16px !important;width:100% !important;padding:11px !important;
    border:0 !important;border-radius:8px !important;cursor:pointer !important;
    background:linear-gradient(135deg,#4f6ef7,#7c3aed) !important;
    color:#ffffff !important;font-size:14px !important;font-weight:600 !important;
}
.akch-guest-enter:disabled{opacity:.6 !important;cursor:default !important;}
.akch-guest-gate-err{margin:8px 0 0 !important;font-size:13px !important;color:#d63638 !important;}

/* When the gate is open, prevent the page below from scrolling */
body.akch-gate-open{overflow:hidden !important;}

/* Shortcode container — keep relative positioning for other in-widget overlays */
#akch-app{position:relative;}
