@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';
@source '../**/*.vue';

/* ============================================
   IFOTO UPLOAD COMPONENT STYLES
   Modern, clean design for photo upload
   ============================================ */

:root {
    /* Primary Colors - Warm Coral/Orange Theme */
    --color-primary: #7b88f3;
    --color-primary-hover: #5867dd;
    --color-primary-light: #fef3f1;
    --color-primary-dark: #5867dd;
    
    /* Status Colors */
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    --color-error: #ef4444;
    --color-error-light: #fee2e2;
    
    /* Neutral Colors */
    --color-bg: #fafbfc;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Typography */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0f172a;
        --color-surface: #1e293b;
        --color-border: #334155;
        --color-border-hover: #475569;
        --color-text: #f1f5f9;
        --color-text-secondary: #94a3b8;
        --color-text-muted: #64748b;
        --color-primary-light: #3b2520;
    }
}

/* ============================================
   PHOTO UPLOADER COMPONENT
   ============================================ */

.photo-uploader {
    font-family: var(--font-sans);
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--color-text);
}

/* Header Section */
.uploader-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-info .title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.02em;
}

.header-info .subtitle {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.header-info .subtitle strong {
    color: var(--color-primary);
    font-weight: 600;
}

/* Date Picker */
.date-picker-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.date-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.date-input {
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    transition: all var(--transition-fast);
    min-width: 180px;
}

.date-input:hover:not(:disabled) {
    border-color: var(--color-border-hover);
}

.date-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.date-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Drop Zone */
.drop-zone {
    position: relative;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover:not(.disabled) {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.drop-zone.drag-over {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    border-style: solid;
    transform: scale(1.01);
}

.drop-zone.has-files {
    min-height: auto;
    padding: 1.5rem;
    border-style: solid;
    border-color: var(--color-border);
    background: var(--color-bg);
}

.drop-zone.has-files:hover:not(.disabled) {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.drop-zone.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.drop-icon {
    color: var(--color-primary);
    opacity: 0.8;
    transition: all var(--transition-normal);
}

.drop-zone:hover .drop-icon {
    opacity: 1;
    transform: translateY(-4px);
}

.drop-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.drop-subtext {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.file-types {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}

.add-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Overall Progress */
.overall-progress {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-stats {
    display: flex;
    gap: 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat.success .stat-value {
    color: var(--color-success);
}

.stat.error .stat-value {
    color: var(--color-error);
}

.stat.pending .stat-value {
    color: var(--color-warning);
}

.progress-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-mono);
}

.progress-bar-container {
    height: 8px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    border-radius: var(--radius-sm);
    transition: width var(--transition-normal);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--color-border-hover);
    background: var(--color-surface);
}

.btn-warning {
    background: var(--color-warning);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #d97706;
}

.btn-pause {
    background: var(--color-text-secondary);
    color: white;
}

.btn-pause:hover:not(:disabled) {
    background: var(--color-text);
}

.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
}

/* Validation Message */
.validation-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin: 1rem 0;
}

.validation-message.error {
    background: var(--color-error-light);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 1024px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* Photo Item */
.photo-item {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.photo-item:hover {
    box-shadow: var(--shadow-md);
}

.photo-item.status-pending {
    border-color: var(--color-border);
}

.photo-item.status-uploading {
    border-color: var(--color-primary);
}

.photo-item.status-success {
    border-color: var(--color-success);
}

.photo-item.status-failed {
    border-color: var(--color-error);
}

/* Photo Thumbnail */
.photo-thumbnail {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-bg);
}

.photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.photo-item:hover .photo-thumbnail img {
    transform: scale(1.05);
}

/* Status Overlay */
.status-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.status-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.status-content.success {
    color: var(--color-success);
}

.status-content.failed {
    color: var(--color-error);
}

.progress-text {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* Spinner */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Upload Progress Bar */
.upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
}

.upload-progress-bar {
    height: 100%;
    background: var(--color-primary);
    transition: width var(--transition-fast);
}

/* Photo Info */
.photo-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.photo-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-size {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

/* Photo Actions */
.photo-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.375rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.photo-item:hover .photo-actions {
    opacity: 1;
}

.action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: rgba(0, 0, 0, 0.6);
    color: white;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn.cancel:hover {
    background: var(--color-error);
}

.action-btn.retry:hover {
    background: var(--color-warning);
}

.action-btn.remove:hover {
    background: var(--color-error);
}

/* Error Message */
.error-message {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: var(--color-error);
    background: var(--color-error-light);
    border-top: 1px solid var(--color-error);
}

/* Completion Message */
.completion-message {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--color-success-light);
    border-radius: var(--radius-xl);
    margin-top: 2rem;
    border: 2px solid var(--color-success);
}

.completion-icon {
    color: var(--color-success);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.completion-message h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-success);
    margin: 0 0 0.5rem 0;
}

.completion-message p {
    color: var(--color-text);
    margin: 0;
}

.processing-note {
    font-size: 0.9rem;
    color: var(--color-text-secondary) !important;
    margin-top: 0.5rem !important;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .photo-uploader {
        padding: 1rem;
    }
    
    .uploader-header {
        flex-direction: column;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
    }
    
    .progress-stats {
        gap: 1rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .action-buttons {
        justify-content: stretch;
    }
    
    .btn {
        flex: 1;
        justify-content: center;
    }
    
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* ============================================
   PHOTOS MANAGER COMPONENT
   ============================================ */

.photos-manager {
    font-family: var(--font-sans);
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--color-text);
}

.manager-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.manager-header .title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.02em;
}

.manager-header .subtitle {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.manager-header .subtitle strong {
    color: var(--color-primary);
    font-weight: 600;
}

/* Theme for upload page */
@theme {
    --font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';
}
