/* ============================================
   SESSIONS HUB STYLES
   Matches VeraCita dark theme design
   ============================================ */

/* ===== DEFENSIVE SVG SIZING ===== */
/* Prevent SVGs from expanding uncontrollably */
#panel-my-sessions svg,
#panel-shared-with-me svg,
#panel-activity svg {
    max-width: 100%;
    max-height: 200px;
    flex-shrink: 0;
}

/* ===== NAV BADGE ===== */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: auto;
    background: linear-gradient(135deg, #8b5cf6, var(--vc-accent-primary-hover));
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

/* ===== SESSIONS TABS ===== */
.sessions-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sessions-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sessions-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.sessions-tab.active {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

/* ===== SESSIONS SEARCH ===== */
.sessions-search {
    position: relative;
    margin-bottom: 20px;
}

.sessions-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.sessions-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.sessions-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.sessions-search input:focus {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

/* ===== SESSIONS LIST ===== */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sessions-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 16px;
}

.sessions-loading p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.sessions-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.sessions-empty svg {
    width: 48px;
    height: 48px;
    stroke: rgba(255, 255, 255, 0.3);
    margin-bottom: 16px;
}

.sessions-empty p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin: 0 0 16px;
}

.sessions-empty .btn-start-verifying {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--vc-accent-primary-hover), #8b5cf6);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sessions-empty .btn-start-verifying:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ===== SESSION CARD ===== */
.session-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.session-card:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateY(-1px);
}

.session-card.shared {
    border-left: 3px solid #8b5cf6;
}

.session-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.session-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.15), rgba(123, 66, 255, 0.15));
    border-radius: 10px;
    flex-shrink: 0;
}

.session-card-icon svg {
    width: 20px;
    height: 20px;
    stroke: #8b5cf6;
}

.session-card-icon.shared-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
}

.session-card-info {
    flex: 1;
    min-width: 0;
}

.session-card-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.session-card-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.session-card-shared-by {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shared-by-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--vc-accent-primary-hover), #8b5cf6);
    border-radius: 50%;
    font-size: 9px;
    font-weight: 600;
    color: white;
}

.session-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ===== SESSION CARD STATUS ===== */
.session-card-status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.session-card-status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--vc-status-partial);
}

.session-card-status.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--vc-status-supported);
}

.session-card-status.failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--vc-status-unsupported);
}

/* ===== SESSION CARD PERMISSION BADGE ===== */
.session-card-permission {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

.session-card-permission.view {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.session-card-permission.edit {
    background: rgba(67, 132, 255, 0.15);
    color: #60a5fa;
}

.session-card-permission.admin {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

/* ===== SESSION CARD BUTTON ===== */
.session-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.session-card-btn svg {
    width: 14px;
    height: 14px;
}

.session-card-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

/* ===== SESSION CARD COLLABORATORS ===== */
.session-card-collaborators {
    display: flex;
    align-items: center;
}

.collaborator-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: 2px solid rgba(30, 37, 56, 1);
    font-size: 10px;
    font-weight: 600;
    color: white;
    margin-left: -8px;
}

.collaborator-avatar:first-child {
    margin-left: 0;
}

.collaborator-avatar.more {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 9px;
}

/* ===== ACTIVITY TIMELINE ===== */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
}

.activity-item-icon svg {
    width: 18px;
    height: 18px;
}

.activity-item-icon.share {
    background: rgba(139, 92, 246, 0.15);
}

.activity-item-icon.share svg {
    stroke: #a78bfa;
}

.activity-item-icon.comment {
    background: rgba(67, 132, 255, 0.15);
}

.activity-item-icon.comment svg {
    stroke: #60a5fa;
}

.activity-item-icon.success {
    background: rgba(16, 185, 129, 0.15);
}

.activity-item-icon.success svg {
    stroke: var(--vc-status-supported);
}

.activity-item-icon.error {
    background: rgba(239, 68, 68, 0.15);
}

.activity-item-icon.error svg {
    stroke: var(--vc-status-unsupported);
}

.activity-item-icon.default {
    background: rgba(255, 255, 255, 0.05);
}

.activity-item-icon.default svg {
    stroke: rgba(255, 255, 255, 0.5);
}

.activity-item-content {
    flex: 1;
    min-width: 0;
}

.activity-item-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 4px;
}

.activity-item-description strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.activity-item-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== ACTIVITY FILTER SELECT ===== */
.activity-filter-select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.activity-filter-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.activity-filter-select:focus {
    border-color: rgba(139, 92, 246, 0.5);
}

.activity-filter-select option {
    background: #1e2538;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== SECTION DESCRIPTION ===== */
.section-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .session-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .session-card-actions {
        justify-content: space-between;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .sessions-tabs {
        flex-wrap: wrap;
    }

    .sessions-tab {
        flex: 0 0 auto;
        min-width: 80px;
    }
}
