/* ============================================================
   STATUS FEATURE — SoniTalk
   WhatsApp-style 24-hour status
   ============================================================ */

/* ── Status bar in sidebar ── */
.status-bar {
    padding: 0.6rem 1rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.status-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.status-bar-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--clr-muted, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.status-add-btn {
    background: none;
    border: none;
    color: var(--clr-accent, #a78bfa);
    font-size: 0.78rem;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}

.status-add-btn:hover {
    opacity: 0.75;
}

/* ── Status avatar row (horizontal scroll) ── */
.status-avatars {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    scrollbar-width: none;
}

.status-avatars::-webkit-scrollbar {
    display: none;
}

.status-avatar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.status-ring-wrap {
    position: relative;
    width: 48px;
    height: 48px;
}

/* Ring states */
.status-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 2.5px;
    cursor: pointer;
    background: conic-gradient(#9ca3af 0%, #9ca3af 100%);
    /* unseen = grey */
    transition: transform 0.18s ease;
}

.status-ring.has-unseen {
    background: conic-gradient(#a78bfa 0%, #6366f1 50%, #8b5cf6 100%);
    animation: ring-pulse 2s ease-in-out infinite;
}

@keyframes ring-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(167, 139, 250, 0);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.25);
    }
}

.status-ring:hover {
    transform: scale(1.08);
}

.status-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #0f0e17;
    background: linear-gradient(135deg, #1e1b4b, #0f0e17);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.status-ring-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* My status add icon */
.status-add-ring {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: var(--clr-accent, #7c3aed);
    border-radius: 50%;
    border: 2px solid #0f0e17;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    color: #fff;
    font-weight: 900;
}

.status-avatar-name {
    font-size: 0.65rem;
    color: var(--clr-muted, #9ca3af);
    max-width: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* ── FULLSCREEN VIEWER ── */
.status-viewer-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    user-select: none;
}

.status-viewer-overlay.hidden {
    display: none;
}

/* Progress bars */
.status-progress-bars {
    display: flex;
    gap: 3px;
    padding: 10px 12px 6px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
}

.status-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.status-progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.1s linear;
}

.status-progress-fill.done {
    width: 100%;
}

/* Viewer top bar */
.status-viewer-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 40px 14px 12px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

.status-viewer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.status-viewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-viewer-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.status-viewer-time {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
}

.status-viewer-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    opacity: 0.85;
}

.status-viewer-close:hover {
    opacity: 1;
}

/* Content area */
.status-viewer-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-viewer-content img,
.status-viewer-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.status-text-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    font-size: clamp(1.2rem, 5vw, 2.2rem);
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
}

/* Tap zones */
.status-tap-prev,
.status-tap-next {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    z-index: 3;
    cursor: pointer;
}

.status-tap-prev {
    left: 0;
}

.status-tap-next {
    right: 0;
}

/* Views count */
.status-views-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 4;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
}

/* My status delete button */
.status-delete-btn {
    margin-left: auto;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s;
}

.status-delete-btn:hover {
    background: rgba(239, 68, 68, 0.35);
}

/* ── COMPOSER MODAL ── */
.status-composer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.status-composer-overlay.hidden {
    display: none;
}

.status-composer-box {
    background: #12111f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: composer-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes composer-pop {
    from {
        transform: scale(0.88);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.status-composer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.status-composer-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.status-composer-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.1rem;
    cursor: pointer;
}

/* Tabs */
.status-composer-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.composer-tab {
    flex: 1;
    padding: 0.65rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.composer-tab.active {
    color: #a78bfa;
    border-bottom: 2px solid #7c3aed;
    background: rgba(124, 58, 237, 0.08);
}

/* Preview box */
.status-preview-box {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    padding: 1.5rem;
    text-align: center;
    word-break: break-word;
    transition: background 0.3s;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.status-preview-box img,
.status-preview-box video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

/* Text input */
.status-text-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.75rem;
    resize: none;
    margin: 0.75rem 1.25rem;
    width: calc(100% - 2.5rem);
    outline: none;
}

.status-text-input::placeholder {
    color: #6b7280;
}

/* Color picker */
.status-bg-colors {
    display: flex;
    gap: 8px;
    padding: 0.5rem 1.25rem 0.75rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s, border-color 0.15s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.selected {
    border-color: #fff;
    transform: scale(1.15);
}

/* File upload area */
.status-file-area {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.status-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    color: #9ca3af;
    font-size: 0.82rem;
    transition: border-color 0.2s;
}

.status-file-label:hover {
    border-color: #7c3aed;
    color: #a78bfa;
}

.status-file-label i {
    font-size: 1.5rem;
}

/* Submit button */
.status-submit-btn {
    width: calc(100% - 2.5rem);
    margin: 0.25rem 1.25rem 1.25rem;
    padding: 0.7rem;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.status-submit-btn:hover {
    opacity: 0.85;
}

.status-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}