/* ========================================
   Sketchbook Gallery - Clean CSS
   Individual page navigation, modern design
   Last Updated: July 2025
   ======================================== */

/* ========================================
   LAYOUT & CONTAINER STYLES
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    margin-bottom: 10px;
}

/* ========================================
   GALLERY STATS & STATUS
   ======================================== */

.gallery-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9em;
    color: #666;
}

.status-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #1976d2;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.9em;
}

.status-info a {
    color: #1976d2;
    text-decoration: none;
    font-weight: bold;
}

.status-info a:hover {
    text-decoration: underline;
}

/* ========================================
   FILTER CONTROLS
   ======================================== */

.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-label {
    font-weight: bold;
    font-size: 0.9em;
    color: #555;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.9em;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #545b62;
    color: white;
    text-decoration: none;
}

/* ========================================
   POPULAR TAGS
   ======================================== */

.popular-tags {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.popular-tags label {
    font-weight: bold;
    margin-right: 10px;
    color: #555;
}

.tag-filter-btn {
    display: inline-block;
    padding: 6px 12px;
    margin: 3px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
    text-decoration: none;
    color: #495057;
}

.tag-filter-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.tag-filter-btn.selected {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* ========================================
   GALLERY GRID
   ======================================== */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* ========================================
   IMAGE CARDS
   ======================================== */

.image-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* REMOVED: Duplicate .image-card.hover rule - redundant with :hover */

/* Image Links */
.image-link {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.image-link img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.image-link:hover img {
    transform: scale(1.05);
}

/* ========================================
   IMAGE CARD CONTENT
   ======================================== */

.image-info {
    padding: 15px;
}

.image-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    color: #333;
}

.title-link {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.title-link:hover {
    color: #007cba;
}

.image-info p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9em;
}

/* ========================================
   TAG SYSTEM INTEGRATION
   ======================================== */

/* Ensure tag containers in image cards integrate well */
.image-card .tag-container {
    margin-top: 12px;
    margin-bottom: 0;
}

/* Tag system styles are handled in tags.css */

/* ========================================
   CARD ACTIONS
   ======================================== */

.card-actions {
    margin-top: 15px;
    display: flex;
    gap: 8px;
}

.action-btn {
    display: inline-block;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
    text-decoration: none;
}

/* ========================================
   PROCESSING STATES
   ======================================== */

.processing-placeholder {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
}

.processing-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-block;
    padding: 10px 15px;
    background: white;
    border: 1px solid #dee2e6;
    color: #007cba;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 500;
}

.page-btn:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
    text-decoration: none;
}

.page-btn.current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.page-btn.disabled {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
}

/* ========================================
   INDIVIDUAL IMAGE PAGE STYLES
   ======================================== */

.individual-image-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.breadcrumb {
    margin: 20px 0;
    font-size: 0.9em;
    color: #666;
}

.breadcrumb a {
    color: #007cba;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.image-container {
    text-align: center;
    margin: 20px 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-container img {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.image-container img:hover {
    transform: scale(1.02);
}

.image-navigation {
    margin: 30px 0;
    text-align: center;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-button {
    display: inline-block;
    padding: 12px 20px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.2s;
}

.nav-button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.nav-button.disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
}

.nav-button.gallery {
    background: #28a745;
}

.nav-button.gallery:hover {
    background: #1e7e34;
}


/* ========================================
   SOCIAL SHARING
   ======================================== */

.social-sharing {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-sharing h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.share-url {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.share-url label {
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

.share-url input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.share-url button {
    padding: 8px 15px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.share-url button:hover {
    background: #005a87;
}

.share-buttons {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-button {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: opacity 0.2s;
}

.share-button:hover {
    opacity: 0.9;
    color: white;
    text-decoration: none;
}

.share-button.facebook {
    background: #3b5998;
}

.share-button.twitter {
    background: #1da1f2;
}

.share-button.email {
    background: #666;
}

/* ========================================
   FILTER BAR INTEGRATION
   ======================================== */

/* Filter bar styles are handled in tags.css */
/* This ensures proper spacing when filter bar appears */
.filter-bar + .gallery {
    margin-top: 20px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        min-width: auto;
        width: 100%;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .pagination {
        justify-content: center;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-button {
        width: 100%;
        text-align: center;
    }
    
    .share-url {
        flex-direction: column;
        align-items: stretch;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-button {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .individual-image-page {
        padding: 10px;
    }
    
    .image-container {
        padding: 10px;
    }
}

/* ========================================
   FUTURE ENHANCEMENTS READY
   ======================================== */

/* Favorites system preparation */
.image-card .favorite-btn {
    /* Styles will be added when user accounts are implemented */
}


/* 
ART DROP CSS - FULLY COMPLIANT WITH TIME-BASED THEMING
Following guidelines from Theme System Architecture documentation
*/

/* ===== ART DROP PREVIEW STYLING ===== */
.art-drop-preview {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    background: var(--speech-bg-color) !important;
    border-radius: 8px !important;
    border: 2px dashed var(--button-color) !important;
    text-align: center !important;
    min-height: 200px !important;
    position: relative !important;
    overflow: hidden !important;
}

.drop-icon {
    font-size: 2.5rem !important;
    margin-bottom: 10px !important;
    animation: gentle-bounce 2s ease-in-out infinite !important;
    color: var(--button-color) !important;
}

.drop-title {
    font-size: 1.2rem !important;
    font-weight: bold !important;
    color: var(--header-footer-bg) !important;
    margin: 8px 0 4px 0 !important;
}

.drop-subtitle {
    color: var(--text-color-secondary) !important;
    font-size: 0.9rem !important;
    margin: 0 0 15px 0 !important;
}

.anticipation-bar {
    width: 80% !important;
    height: 4px !important;
    background: var(--panel-border-color) !important;
    border-radius: 2px !important;
    overflow: hidden !important;
    margin: 10px 0 !important;
}

.anticipation-fill {
    height: 100% !important;
    background: var(--button-color) !important;
    animation: anticipation-pulse 3s ease-in-out infinite !important;
    width: 60% !important;
    border-radius: 2px !important;
}

.drop-hint {
    font-size: 0.8rem !important;
    color: var(--text-color-secondary) !important;
    font-style: italic !important;
}

/* ===== ART DROP STATUS BAR ===== */
.art-drop-status {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 20px !important;
    background: var(--speech-bg-color) !important;
    border-radius: 6px !important;
    border-left: 4px solid var(--button-color) !important;
    color: var(--text-color) !important;
}

.drop-message {
    font-weight: 500 !important;
    color: var(--text-color) !important;
}

.excitement-indicator {
    font-size: 0.9rem !important;
    color: var(--text-color-secondary) !important;
    font-style: italic !important;
}

/* ===== FEATURED ART STAGING ===== */
.featured-art-staging {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 30px !important;
    background: var(--speech-bg-color) !important;
    border-radius: 8px !important;
    border: 2px dashed var(--button-color) !important;
    text-align: center !important;
}

.staging-icon {
    font-size: 3rem !important;
    margin-bottom: 15px !important;
    animation: gentle-glow 2s ease-in-out infinite alternate !important;
    color: var(--button-color) !important;
}

.staging-message h4 {
    color: var(--header-footer-bg) !important;
    margin: 0 0 8px 0 !important;
}

.staging-message p {
    color: var(--text-color-secondary) !important;
    margin: 0 !important;
    font-style: italic !important;
}

/* ===== COUNTDOWN TIMER STYLING ===== */
.drop-status {
    font-weight: bold !important;
    color: var(--header-footer-bg) !important;
}

.drop-countdown {
    color: var(--text-color) !important;
    margin: 0 10px !important;
}

.drop-progress {
    color: var(--text-color-secondary) !important;
    font-size: 0.9rem !important;
}

/* ===== TAG PLACEHOLDER UPDATE ===== */
.tag-placeholder {
    background: var(--panel-bg-color) !important;
    color: var(--text-color-secondary) !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 0.8rem !important;
    font-style: italic !important;
    border: 1px dashed var(--panel-border-color) !important;
}

/* ===== MOBILE-FIRST RESPONSIVE DESIGN ===== */
.art-drop-preview {
    padding: 15px !important;
}

@media (min-width: 768px) {
    .art-drop-preview {
        padding: 30px !important;
    }
    
    .drop-icon {
        font-size: 3rem !important;
    }
}

/* ===== TOUCH-FRIENDLY DESIGN ===== */
.art-drop-preview {
    min-height: 44px !important; /* iOS touch target minimum */
}

/* ===== THEME-SPECIFIC STYLING ===== */
/* Night mode adjustments */
.theme-night .art-drop-preview {
    filter: brightness(0.9) contrast(1.1) !important;
}

.theme-night .drop-icon,
.theme-night .staging-icon {
    filter: brightness(0.95) !important;
}

/* Evening mode adjustments */
.theme-evening .art-drop-preview {
    filter: brightness(0.95) contrast(1.05) !important;
}

/* Dawn/Morning mode - no adjustments needed, use defaults */

/* ===== ANIMATIONS ===== */
@keyframes gentle-bounce {
    0%, 100% { 
        transform: translateY(0) !important; 
    }
    50% { 
        transform: translateY(-8px) !important; 
    }
}

@keyframes anticipation-pulse {
    0% { 
        width: 30% !important; 
        opacity: 0.6 !important; 
    }
    50% { 
        width: 70% !important; 
        opacity: 1 !important; 
    }
    100% { 
        width: 30% !important; 
        opacity: 0.6 !important; 
    }
}

@keyframes gentle-glow {
    0% { 
        opacity: 0.8 !important; 
        transform: scale(1) !important; 
    }
    100% { 
        opacity: 1 !important; 
        transform: scale(1.05) !important; 
    }
}

/* Gallery-level queue status bar */
.art-drop-queue-status {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px 20px !important;
    background: linear-gradient(135deg, var(--speech-bg-color), var(--panel-bg-color)) !important;
    border-radius: 8px !important;
    border-left: 4px solid var(--button-color) !important;
    margin: 15px 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.queue-icon {
    font-size: 1.5rem !important;
    color: var(--button-color) !important;
}

.queue-info {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.queue-main {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
}

.queue-detail {
    font-size: 0.85rem !important;
    color: var(--text-color-secondary) !important;
}

.queue-estimate {
    text-align: right !important;
}

.estimate-text {
    font-size: 0.9rem !important;
    color: var(--header-footer-bg) !important;
    font-weight: 500 !important;
    background: var(--panel-bg-color) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    border: 1px solid var(--panel-border-color) !important;
}

/* Simplified individual image cards */
.art-drop-preview-simple {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 30px 20px !important;
    background: var(--speech-bg-color) !important;
    border-radius: 8px !important;
    border: 2px dashed var(--panel-border-color) !important;
    text-align: center !important;
    min-height: 200px !important;
}

.drop-icon {
    font-size: 2.5rem !important;
    margin-bottom: 15px !important;
    color: var(--button-color) !important;
}

.drop-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: var(--header-footer-bg) !important;
    margin: 0 0 8px 0 !important;
}

.drop-subtitle {
    color: var(--text-color-secondary) !important;
    font-size: 0.9rem !important;
    margin: 0 0 15px 0 !important;
}

.queue-reminder {
    padding: 8px 12px !important;
    background: var(--panel-bg-color) !important;
    border-radius: 12px !important;
    border: 1px solid var(--panel-border-color) !important;
}

.queue-reminder small {
    color: var(--text-color-secondary) !important;
    font-weight: 500 !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .art-drop-queue-status {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 12px 15px !important;
    }
    
    .queue-estimate {
        text-align: left !important;
        width: 100% !important;
    }
    
    .estimate-text {
        display: block !important;
        text-align: center !important;
    }
}

/* Theme support for night mode */
.theme-night .art-drop-queue-status {
    filter: brightness(0.9) !important;
}

.theme-night .art-drop-preview-simple {
    filter: brightness(0.9) !important;
}

/* Enhanced image card styling */
.art-drop-preview-simple {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 25px 20px !important;
    background: var(--speech-bg-color) !important;
    border-radius: 8px !important;
    border: 2px dashed var(--panel-border-color) !important;
    text-align: center !important;
    min-height: 200px !important;
}

.drop-icon {
    font-size: 2.5rem !important;
    margin-bottom: 12px !important;
    color: var(--button-color) !important;
}

.drop-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: var(--header-footer-bg) !important;
    margin: 0 0 6px 0 !important;
}

.drop-subtitle {
    color: var(--text-color-secondary) !important;
    font-size: 0.9rem !important;
    margin: 0 0 8px 0 !important;
}

.processing-schedule {
    padding: 6px 10px !important;
    background: var(--panel-bg-color) !important;
    border-radius: 12px !important;
    border: 1px solid var(--panel-border-color) !important;
    margin-top: 8px !important;
}

.processing-schedule small {
    color: var(--text-color-secondary) !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .art-drop-preview-simple {
        padding: 20px 15px !important;
        min-height: 180px !important;
    }
    
    .drop-icon {
        font-size: 2rem !important;
    }
}
