/* ============================================================================
   Widget Cards Component
   Container cards for dashboard sections and content groups
   ============================================================================ */

/* Widgets Grid Container */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: 2rem;
}

/* Activities Calendar Grid (2:1 ratio) */
.activities-calendar-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: 2rem;
}

/* Base Widget Card */
.widget-card {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    border: 2px solid var(--gray-200);
    transition: all var(--transition-base);
}

.widget-card:hover {
    border-color: var(--ekafa-accent);
    box-shadow: 0 4px 12px rgba(0, 168, 107, 0.15);
}

/* Widget Card Variants */
.widget-card--white {
    background: white;
}

.widget-card--full {
    grid-column: 1 / -1;
}

.widget-card--no-hover:hover {
    transform: none;
    box-shadow: none;
}

/* Widget Header */
.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
}

.widget-header--no-border {
    border-bottom: none;
    padding-bottom: 0;
}

/* Widget Title */
.widget-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.widget-title i {
    color: var(--ekafa-accent);
    font-size: 1.25rem;
}

/* Widget Actions */
.widget-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Widget Body */
.widget-body {
    padding: 0;
}

.widget-body--scroll {
    max-height: 400px;
    overflow-y: auto;
}

/* Widget Footer */
.widget-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--gray-200);
    text-align: center;
}

/* View All Link */
.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ekafa-accent);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.view-all-link:hover {
    color: var(--ekafa-primary);
    text-decoration: none;
}

.view-all-link i {
    transition: transform var(--transition-fast);
}

.view-all-link:hover i {
    transform: translateX(4px);
}

/* Section Header (for widget subsections) */
.section-header {
    font-weight: 700;
    color: #374151;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #e5e7eb;
}

/* Section Header Row - header with button beside it */
.section-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-header-row .section-header {
    margin-bottom: 0;
    flex: 1;
}

.section-header-row .btn-view-all {
    flex-shrink: 0;
    background: linear-gradient(135deg, #00a86b 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.section-header-row .btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 107, 0.3);
    color: white;
}

/* Pending List (for admin dashboard) */
.pending-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

.pending-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pending-item:last-child {
    margin-bottom: 0;
}

.pending-details {
    flex: 1;
}

.pending-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.pending-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-circle);
    object-fit: cover;
}

.pending-name {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.pending-date {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Pending Badge (NEW badge) */
.pending-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 992px) {
    .activities-calendar-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .widgets-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .widget-card {
        padding: 1rem;
    }

    .widget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
