/* Explain: Component styles for badges, buttons, cards, input fields, and voice recording indicators. */
.sphere-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.sphere-professional {
    border-color: rgba(37, 99, 235, 0.22);
    background: rgba(37, 99, 235, 0.10);
    color: #1D4ED8;
}

.sphere-personal {
    border-color: rgba(219, 39, 119, 0.22);
    background: rgba(219, 39, 119, 0.10);
    color: #BE185D;
}

.sphere-public {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.12);
    color: #B45309;
}

.sphere-private {
    border-color: rgba(15, 118, 110, 0.22);
    background: rgba(15, 118, 110, 0.10);
    color: #0F766E;
}

.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    font-weight: 800;
}

.post-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    background: var(--surface-color);
    box-shadow: var(--shadow-card);
    transition: box-shadow 200ms ease, transform 200ms ease;
}

.post-card:hover {
    box-shadow: var(--shadow-soft);
}

.abook-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    background: var(--surface-color);
    box-shadow: var(--shadow-card);
}

.gradient-brand {
    background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
}

.abook-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    border-radius: 999px;
    padding: 0 1.25rem;
    font-weight: 700;
    transition: all 180ms ease;
}

.abook-btn-primary {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.28);
}

.abook-btn-primary:hover,
.abook-btn-primary:focus-visible {
    transform: translateY(-1px);
    background: var(--primary-hover);
}

.abook-btn-ghost {
    background: var(--surface-soft);
    color: var(--text-color);
}

.abook-btn-ghost:hover,
.abook-btn-ghost:focus-visible {
    background: #E2E5F4;
}

.abook-input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--surface-color);
    padding: 0.75rem 1rem;
    color: var(--text-color);
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.abook-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
}

.abook-input::placeholder {
    color: rgba(107, 114, 128, 0.72);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 160ms ease;
}

.action-btn:hover,
.action-btn:focus-visible {
    background: var(--surface-soft);
    color: var(--text-color);
}

.action-btn.is-active {
    color: #DB2777;
}

.mention-link {
    color: var(--primary-color);
    font-weight: 700;
}

.mention-link:hover,
.mention-link:focus-visible {
    text-decoration: underline;
}

.faq-item > summary,
details > summary.list-none {
    list-style: none;
}

.faq-item > summary::-webkit-details-marker,
details > summary.list-none::-webkit-details-marker {
    display: none;
}

.faq-chevron {
    transition: transform 200ms ease;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.story-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 999px;
    padding: 3px;
    background: conic-gradient(from 200deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--sphere-personal), var(--primary-color));
    transition: transform 180ms ease;
}

.story-ring.is-seen {
    background: var(--border-color);
}

.js-story-open:hover .story-ring,
.js-story-add:hover .story-ring {
    transform: scale(1.05);
}

.story-ring-media {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    border: 2px solid var(--surface-color);
    background: var(--surface-soft);
    overflow: hidden;
}

.story-ring-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-add-badge {
    position: absolute;
    inset-inline-end: -0.15rem;
    bottom: -0.15rem;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    border: 2px solid var(--surface-color);
    font-size: 0.7rem;
}

.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    background: rgba(6, 12, 10, 0.94);
}

.story-viewer.is-open {
    display: flex;
}

.story-progress {
    display: flex;
    gap: 3px;
}

.story-progress span {
    flex: 1;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.story-progress span i {
    display: block;
    height: 100%;
    width: 0;
    background: #ffffff;
}

.story-nav {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transition: background 180ms ease;
}

.story-nav:hover,
.story-nav:focus-visible {
    background: rgba(255, 255, 255, 0.32);
}

.mic-recording,
.mic-recording:hover,
.mic-recording:focus-visible {
    background: var(--sphere-personal);
    color: #ffffff;
}

.rec-dot {
    width: 0.65rem;
    height: 0.65rem;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--sphere-personal);
    animation: abook-rec-pulse 1s ease-in-out infinite;
}

@keyframes abook-rec-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(0.7);
    }
}

.online-dot {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    background: var(--online-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
    flex-shrink: 0;
}

.online-dot.is-offline {
    display: none;
}

.presence-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.presence-badge {
    position: absolute;
    inset-inline-end: -1px;
    bottom: -1px;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
    background: var(--online-color);
    border: 2px solid var(--surface-color);
}

.presence-badge.is-offline {
    display: none;
}