/* 
 * Single Worksheet Page Styles - Simple & Clean Design
 */

/* Hide the default coloring-pages-grid-full on worksheet pages */
body[class*="worksheet"] .coloring-pages-grid-full,
body[class*="tracing"] .coloring-pages-grid-full,
.single-worksheet .coloring-pages-grid-full,
.single-tracing-worksheets .coloring-pages-grid-full {
    display: none !important;
}

/* Simple Worksheet Gallery Grid */
.worksheet-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.worksheet-gallery-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.worksheet-gallery-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.worksheet-gallery-image {
    width: 100%;
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.worksheet-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.worksheet-gallery-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

/* Simple Download Button */
.worksheet-download-btn-wrap {
    margin: 15px 0;
}

.worksheet-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.worksheet-download-btn:hover {
    background: #1d4ed8;
    color: white;
    transform: translateY(-1px);
}

.worksheet-download-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.worksheet-download-btn i {
    font-size: 0.875rem;
}

/* Loading and success states */
.worksheet-download-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

.worksheet-download-btn .fa-check {
    color: #10b981;
}

.worksheet-download-btn .fa-exclamation-triangle {
    color: #f59e0b;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Simple Meta Badges */
.worksheet-gallery-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.worksheet-gallery-badge {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.worksheet-gallery-number {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Simple Gallery Header */
.worksheet-gallery-header {
    text-align: center;
    margin: 40px auto 30px auto;
    max-width: 600px;
    padding: 0 20px;
}

.worksheet-gallery-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.worksheet-gallery-header p {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

/* Simple Gallery Stats */
.worksheet-gallery-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px auto 30px auto;
    flex-wrap: wrap;
}

.worksheet-stat-item {
    text-align: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 6px;
    min-width: 80px;
}

.worksheet-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    display: block;
    margin-bottom: 4px;
}

.worksheet-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
}

/* Enhanced bulk download for worksheets */
body[class*="worksheet"] .bulk-worksheets-download-box,
body[class*="tracing"] .bulk-worksheets-download-box,
.single-worksheet .bulk-worksheets-download-box,
.single-tracing-worksheets .bulk-worksheets-download-box {
    margin: 40px auto !important;
    max-width: 600px !important;
    border: 2px solid #2563eb !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1) !important;
}

body[class*="worksheet"] .bulk-download-button,
body[class*="tracing"] .bulk-download-button,
.single-worksheet .bulk-download-button,
.single-tracing-worksheets .bulk-download-button {
    background: #2563eb !important;
    padding: 12px 24px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}

body[class*="worksheet"] .bulk-download-button:hover,
body[class*="tracing"] .bulk-download-button:hover,
.single-worksheet .bulk-download-button:hover,
.single-tracing-worksheets .bulk-download-button:hover {
    background: #1d4ed8 !important;
}

/* Mobile responsive design */
@media (max-width: 768px) {
    .worksheet-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin: 30px auto;
        padding: 0 15px;
    }
    
    .worksheet-gallery-item {
        padding: 15px;
    }
    
    .worksheet-gallery-image {
        height: 150px;
        margin-bottom: 12px;
    }
    
    .worksheet-gallery-header h2 {
        font-size: 1.5rem;
    }
    
    .worksheet-gallery-stats {
        gap: 15px;
        margin: 15px auto 20px auto;
    }
    
    .worksheet-stat-item {
        padding: 12px;
        min-width: 70px;
    }
    
    .worksheet-stat-number {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .worksheet-gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 10px;
    }
    
    .worksheet-gallery-item {
        padding: 12px;
    }
    
    .worksheet-gallery-image {
        height: 120px;
    }
    
    .worksheet-gallery-header h2 {
        font-size: 1.25rem;
    }
    
    .worksheet-gallery-stats {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .worksheet-stat-item {
        width: 100%;
        max-width: 150px;
    }
}

/* Clean up other elements on worksheet pages */
body[class*="worksheet"] .related-coloring-pages,
body[class*="tracing"] .related-coloring-pages,
.single-worksheet .related-coloring-pages,
.single-tracing-worksheets .related-coloring-pages {
    margin: 60px 0 40px 0 !important;
    padding: 40px 0 !important;
    background: #f9fafb !important;
    border-radius: 8px !important;
}

body[class*="worksheet"] .related-title,
body[class*="tracing"] .related-title,
.single-worksheet .related-title,
.single-tracing-worksheets .related-title {
    font-size: 1.5rem !important;
    color: #1f2937 !important;
    text-align: center !important;
    margin-bottom: 20px !important;
}

body[class*="worksheet"] .month-btn,
body[class*="tracing"] .month-btn,
.single-worksheet .month-btn,
.single-tracing-worksheets .month-btn {
    background: white !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    padding: 8px 16px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

body[class*="worksheet"] .month-btn:hover,
body[class*="tracing"] .month-btn:hover,
.single-worksheet .month-btn:hover,
.single-tracing-worksheets .month-btn:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: white !important;
}