/* Modern Dashboard Enhancements */

/* Dashboard grid layout */
#dashboard-widgets-wrap {
    display: block;
    margin-top: 20px;
}

#dashboard-widgets-left {
    display: block;
    float: left;
    width: 65%;
    margin-right: 2%;
}

#dashboard-widgets-right {
    display: block;
    float: right;
    width: 33%;
}

/* Clear floats */
#dashboard-widgets-wrap::after {
    content: "";
    display: table;
    clear: both;
}

/* Hide the drag boxes area */
#dashboard-widgets-wrap .meta-box-sortables {
    min-height: auto !important;
}

#dashboard-widgets-wrap .meta-box-sortables:empty {
    display: none !important;
}

/* Remove empty drag area styling */
#dashboard-widgets-wrap .meta-box-sortables:empty::before {
    display: none !important;
}

/* Hide the "Drag boxes here" text */
#dashboard-widgets-wrap .meta-box-sortables:empty::after {
    display: none !important;
}

/* Remove any placeholder text in empty areas */
#dashboard-widgets-wrap .meta-box-sortables:empty {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure proper spacing between widgets */
#dashboard-widgets-wrap .meta-box-sortables .postbox {
    margin-bottom: 20px !important;
}

#dashboard-widgets-wrap .meta-box-sortables .postbox:last-child {
    margin-bottom: 0 !important;
}

/* Fix any overflow issues */
#dashboard-widgets-wrap {
    overflow: visible !important;
}

/* Ensure proper layout on smaller screens */
@media screen and (max-width: 1200px) {
    #dashboard-widgets-left {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
    
    #dashboard-widgets-right {
        width: 100% !important;
        float: none !important;
        margin-top: 20px !important;
    }
}

/* Modern widget styling */
.postbox {
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e9ecef !important;
    background-color: #ffffff !important;
    overflow: hidden;
}

.postbox .hndle {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-bottom: 1px solid #e9ecef !important;
    font-weight: 600 !important;
    color: #495057 !important;
    padding: 20px !important;
    border-radius: 12px 12px 0 0 !important;
    font-size: 16px !important;
}

.postbox .inside {
    padding: 25px !important;
}

/* Welcome widget specific styling */
#modern_welcome_widget .postbox {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
}

#modern_welcome_widget .hndle {
    background: transparent !important;
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

#modern_welcome_widget .inside {
    color: white !important;
}

#modern_welcome_widget h3 {
    color: white !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    margin: 0 0 15px 0 !important;
    letter-spacing: -0.02em !important;
}

#modern_welcome_widget p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin: 0 0 20px 0 !important;
}

/* Quick actions grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.quick-action-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.quick-action-card .dashicons {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}

.quick-action-card h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.quick-action-card p {
    margin: 0;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.4;
}

/* Site stats grid */
.site-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    margin: 0 0 5px 0;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    font-weight: 500;
}

/* Modern buttons */
.modern-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.modern-button:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Dashboard activity widget enhancements */
#dashboard_activity .inside {
    padding: 0 !important;
}

#dashboard_activity .activity-block {
    padding: 20px !important;
    border-bottom: 1px solid #f1f3f4 !important;
}

#dashboard_activity .activity-block:last-child {
    border-bottom: none !important;
}

#dashboard_activity .activity-block:hover {
    background-color: #f8f9fa !important;
}

/* Recent comments widget */
#dashboard_recent_comments .inside {
    padding: 0 !important;
}

#dashboard_recent_comments .comment-meta {
    padding: 15px 20px !important;
    border-bottom: 1px solid #f1f3f4 !important;
}

#dashboard_recent_comments .comment-meta:last-child {
    border-bottom: none !important;
}

#dashboard_recent_comments .comment-meta:hover {
    background-color: #f8f9fa !important;
}

/* WordPress news widget */
#dashboard_primary .inside {
    padding: 0 !important;
}

#dashboard_primary .rss-widget {
    padding: 20px !important;
    border-bottom: 1px solid #f1f3f4 !important;
}

#dashboard_primary .rss-widget:last-child {
    border-bottom: none !important;
}

#dashboard_primary .rss-widget:hover {
    background-color: #f8f9fa !important;
}

/* Quick draft widget */
#dashboard_quick_press .inside {
    padding: 20px !important;
}

#dashboard_quick_press input[type="text"] {
    border-radius: 6px !important;
    border: 1px solid #dee2e6 !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    margin-bottom: 15px !important;
}

#dashboard_quick_press textarea {
    border-radius: 6px !important;
    border: 1px solid #dee2e6 !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    margin-bottom: 15px !important;
    resize: vertical !important;
}

/* Screen options and help tabs */
#screen-options-link-wrap,
#contextual-help-link-wrap {
    background: #f8f9fa !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    margin: 0 5px !important;
}

#screen-options-link-wrap:hover,
#contextual-help-link-wrap:hover {
    background: #e9ecef !important;
}

/* Dashboard welcome panel */
.welcome-panel {
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e9ecef !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
}

.welcome-panel h2 {
    color: #2c3e50 !important;
    font-weight: 700 !important;
    font-size: 24px !important;
    letter-spacing: -0.02em !important;
}

.welcome-panel p {
    color: #6c757d !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
}

/* Responsive design */
@media screen and (max-width: 1200px) {
    #dashboard-widgets-wrap {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .site-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

@media screen and (max-width: 782px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modern-button {
        display: block;
        text-align: center;
        margin-bottom: 10px;
    }
}

/* Animation for dashboard widgets */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.postbox {
    animation: slideInUp 0.4s ease-out;
}

.postbox:nth-child(1) { animation-delay: 0.1s; }
.postbox:nth-child(2) { animation-delay: 0.2s; }
.postbox:nth-child(3) { animation-delay: 0.3s; }
.postbox:nth-child(4) { animation-delay: 0.4s; }
.postbox:nth-child(5) { animation-delay: 0.5s; }
.postbox:nth-child(6) { animation-delay: 0.6s; }
