/**
 * DiveWP Dashboard Styles
 *
 * Styles specific to the dashboard overview page including cards,
 * grid layout, scrollbars and responsive adjustments.
 *
 * @package DiveWP
 * @since 1.0.4
 */

/* Section Title
   ========================================================================== */
.divewp-section-title {
    font-size: 23px;
    font-weight: 400;
    margin: 0 0 1rem;
    padding: 9px 0 4px;
    line-height: 1.3;
    color: #1d2327;
}

/* Dashboard Layout
   ========================================================================== */
.divewp-dashboard-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

/* Cron Jobs Card
   ========================================================================== */
.divewp-card-cron .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.divewp-card-cron .status-pill .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.divewp-cron-status-widget__link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #4299e1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.divewp-cron-status-widget__link:hover {
    color: #3182ce;
}

.divewp-cron-status-widget__link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.divewp-card-cron .divewp-card-body {
    overflow: hidden;
}

/* Warning highlight for overdue tasks */
.divewp-status-list__warning {
    background: #fef3c7;
    border-radius: 4px;
    margin: 0 -8px;
    padding: 6px 8px !important;
}

.divewp-status-list__warning a {
    color: #d97706;
}

.divewp-status-list__warning .divewp-card-count {
    color: #d97706;
    font-weight: 700;
}

/* Card Layout
   ========================================================================== */
.divewp-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    flex: 1;
    min-width: 0;
    padding: 16px;
    position: relative;
    height: 200px;
    /* Fixed height */
    transition: box-shadow 0.3s ease-in-out;
}

.divewp-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.divewp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.divewp-card-header h3 {
    margin: 0;
}

.divewp-card-body {
    color: #4a5568;
    height: calc(100% - 40px);
    /* Subtract header height */
    overflow-y: auto;
    padding-right: 6px;
    /* Space for scrollbar */
}

/* Scrollbar Styling */
.divewp-card-body::-webkit-scrollbar {
    width: 4px;
}

.divewp-card-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.divewp-card-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: background 0.3s;
}

.divewp-card-body:hover::-webkit-scrollbar-thumb {
    background: #94a3b8;
}

/* Card Variants
   ========================================================================== */

.divewp-card-count {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

/* Status List
   ========================================================================== */
.divewp-status-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
}

.divewp-status-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.divewp-status-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.divewp-status-list li:first-child {
    padding-top: 0;
}

.divewp-status-list a {
    text-decoration: none;
    color: #475569;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Firefox Scrollbar */
.divewp-card-body {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Responsive adjustments
   ========================================================================== */
@media screen and (max-width: 1200px) {
    .divewp-dashboard-grid {
        gap: 16px;
    }
}

@media screen and (max-width: 782px) {
    .divewp-dashboard-grid {
        flex-direction: column;
    }

    .divewp-card {
        padding: 12px;
        height: 180px;
        /* Slightly smaller on mobile */
    }

}