/* ============================================================
   Astrologer Card Component — .ac-* classes
   Depends on: design-tokens.css (loaded first via master layout)
   Single source of truth. Shared by talk-page (call list)
   and chat-page (chat list). Do NOT copy these rules into
   page-specific CSS files.
   ============================================================ */

/* ── Card shell ── */
.ac-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    min-height: 135px;
}

/* ── Avatar ── */
.ac-avatar-wrap {
    flex: 0 0 88px;
    width: 88px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 18px;
}
.ac-avatar {
    width: 88px;
    height: 88px;
    display: block;
    text-decoration: none !important;
}
.ac-avatar-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2.5px solid rgba(255,255,255,0.15);
}
.ac-border-online  { border-color: var(--ss-status-success) !important; }
.ac-border-busy    { border-color: var(--ss-saffron-500) !important; }
.ac-border-offline { border-color: rgba(255,255,255,0.15) !important; }

/* ── Status badge ── */
.ac-status-badge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--ss-radius-pill);
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
}
.ac-dot-online.ac-status-badge  { background: var(--ss-online-bg);  color: var(--ss-online-color); border: 1px solid var(--ss-online-border); }
.ac-dot-busy.ac-status-badge    { background: rgba(255,145,0,0.18); color: var(--ss-busy-color); border: 1px solid var(--ss-busy-border); }
.ac-dot-offline.ac-status-badge { background: var(--ss-offline-bg); color: var(--ss-offline-color); border: 1px solid var(--ss-offline-border); }

/* ── Middle info ── */
.ac-info {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}
.ac-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}
.ac-name {
    color: var(--ss-content);
    font-weight: 700;
    font-size: 17px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}
.ac-verified {
    flex-shrink: 0;
    fill: var(--ss-gold-700) !important;
    width: 14px;
    height: 14px;
}
.ac-skill-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}
.ac-skill-tag {
    background: rgba(147,51,234,0.15);
    border: 1px solid rgba(147,51,234,0.35);
    color: #c084fc;
    border-radius: var(--ss-radius-pill);
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.ac-exp {
    color: var(--ss-content-tertiary);
    font-size: 12px;
    white-space: nowrap;
}
.ac-meta-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}
.ac-lang {
    color: var(--ss-content-tertiary);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}
.ac-sessions {
    color: var(--ss-content-caption);
    font-size: 12px;
    white-space: nowrap;
}
.ac-stars-row {
    display: flex;
    align-items: center;
    gap: 2px;
}
.ac-star-f { color: var(--ss-gold-500); font-size: 12px; }
.ac-star-e { color: rgba(255,255,255,0.18); font-size: 12px; }

/* ── Actions panel ── */
.ac-actions {
    flex: 0 0 auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 160px;
}
.ac-actions-wide { min-width: 200px; }

/* Rates — fills the headroom above buttons, centers vertically */
.ac-rates-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    align-self: stretch;
}
.ac-rate {
    color: var(--ss-gold-700);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    flex: 1;
}
.ac-rate-icon { color: var(--ss-content-tertiary); font-size: 11px; margin-right: 3px; }
.ac-coin-img  { width: 13px; vertical-align: middle; }

.ac-free-badge {
    display: inline-block;
    background: var(--ss-online-bg);
    color: var(--ss-online-color);
    border: 1px solid rgba(16,185,129,0.40);
    border-radius: var(--ss-radius-pill);
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* Buttons — horizontal row at the bottom */
.ac-btn-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-self: stretch;
}
.ac-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: var(--ss-radius);
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none !important;
    border: 1px solid transparent;
    line-height: 1;
    transition: box-shadow 0.2s ease;
    flex: 1;
}
.ac-btn-chat {
    background: linear-gradient(135deg, var(--ss-orange), var(--ss-orange-dark));
    color: #fff !important;
}
.ac-btn-chat:hover { box-shadow: var(--ss-glow-orange-sm); color: #fff !important; }
.ac-btn-call {
    background: linear-gradient(135deg, var(--ss-orange), var(--ss-orange-dark));
    color: #fff !important;
}
.ac-btn-call:hover { box-shadow: var(--ss-glow-orange-sm); color: #fff !important; }
.ac-btn-video {
    background: transparent;
    color: var(--ss-gold-700) !important;
    border-color: rgba(212,175,55,0.45);
}
.ac-btn-video:hover { background: rgba(212,175,55,0.08); color: var(--ss-gold-700) !important; }
.ac-btn-disabled {
    background: var(--ss-card-hover);
    color: var(--ss-content-disabled) !important;
    border-color: var(--ss-edge-subtle);
    cursor: default;
}

/* ── Tablet: tighter layout ── */
@media (max-width: 768px) {
    .ac-card { gap: 12px; padding: 16px; }
    .ac-avatar-wrap { flex: 0 0 72px; width: 72px; }
    .ac-avatar, .ac-avatar-img { width: 72px; height: 72px; }
    .ac-name { font-size: 15px; max-width: 100%; }
    .ac-lang { max-width: 100%; }
    .ac-actions, .ac-actions-wide { min-width: 130px; }
    .ac-btn { padding: 8px 14px; font-size: 12px; }
    .ac-rate { font-size: 12px; }
}

/* ── Mobile: actions full-width below info ── */
@media (max-width: 480px) {
    .ac-card { flex-wrap: wrap; gap: 10px; padding: 14px; min-height: auto; }
    .ac-avatar-wrap { flex: 0 0 64px; width: 64px; padding-bottom: 14px; }
    .ac-avatar, .ac-avatar-img { width: 64px; height: 64px; }
    .ac-name { font-size: 14px; max-width: 100%; }
    .ac-lang { max-width: 100%; }
    .ac-skill-tag { font-size: 10px; padding: 1px 7px; }
    .ac-actions, .ac-actions-wide {
        flex: 0 0 100%;
        width: 100%;
        align-self: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        border-top: 1px solid var(--ss-edge-subtle);
        padding-top: 10px;
        margin-top: 4px;
    }
    .ac-rates-row {
        flex: 0 0 auto;
        justify-content: flex-start;
        gap: 12px;
    }
    .ac-btn-row { justify-content: flex-end; gap: 10px; }
    .ac-btn { padding: 8px 16px; font-size: 12px; }
    .ac-status-badge { font-size: 9px; padding: 1px 6px; }
}
