/* DigitalMe Visitor Page Styles
 * Dashboard, Connections (owners), and shared components.
 * Loaded by visitor page templates.
 */

/* === Page Header === */
.page-header {
    margin-bottom: 32px;
}

.page-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* === Stats Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-card-link {
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.stat-card-link:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    text-decoration: none;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* === Quick Links === */
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.quick-link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.quick-link-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    text-decoration: none;
}

.quick-link-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-link-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.quick-link-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* === Section Header === */
.section-header {
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* === Conversation List (Dashboard) === */
.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.15s;
}

.conversation-item:hover {
    border-color: var(--primary);
    text-decoration: none;
}

.conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.conversation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.conversation-tagline {
    font-size: 0.82rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
}

/* === Connections Grid (Owners page) === */
.connections-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.connection-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.connection-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.connection-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 1rem;
}

.connection-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.connection-meta {
    flex: 1;
    min-width: 0;
}

.connection-name {
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
}

.connection-name:hover {
    color: var(--primary);
    text-decoration: underline;
}

.connection-owner {
    font-size: 0.85rem;
    color: var(--text-light);
}

.connection-tagline {
    font-size: 0.88rem;
    color: var(--text-medium, #6b7280);
    margin-bottom: 10px;
}

.connection-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.connection-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.connection-actions {
    display: flex;
    gap: 8px;
}

/* === Status Badges === */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-approved {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

/* === Small Buttons === */
.btn-sm {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
    color: white;
}

.btn-disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: default;
}

.btn-danger-outline {
    background: none;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.btn-danger-outline:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.empty-state p {
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 0.88rem;
}

.empty-hint a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.empty-hint a:hover {
    text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .connection-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .connection-actions {
        width: 100%;
    }

    .connection-actions .btn-sm {
        flex: 1;
        justify-content: center;
    }
}
