/* AI Home Staging Manager - Custom Styles */

:root {
    --staging-primary: #E67E22;
    --staging-secondary: #27AE60;
    --staging-accent: #F39C12;
    --staging-light: #FDF6E3;
    --kiosk-font-size: 1.1rem;
    --mobile-touch-target: 44px;
}

/* Base Layout */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

.container-fluid {
    max-width: 1400px;
}

/* Enhanced Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--bs-border-color);
    font-weight: 600;
}

/* Button Enhancements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--staging-primary) 0%, var(--staging-secondary) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #D35400 0%, #1E8449 100%);
    transform: translateY(-1px);
}

/* Form Enhancements */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--bs-border-color);
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--staging-primary);
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
}

/* Dark Mode Form Check Labels */
.form-check-label {
    color: #dee2e6;
    cursor: pointer;
}

.form-check-input {
    cursor: pointer;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.nav-link {
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Inventory Grid */
.item-card {
    transition: all 0.3s ease;
}

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

.item-card .card-img-top {
    transition: opacity 0.2s ease;
}

.item-card:hover .card-img-top {
    opacity: 0.9;
}

/* Status Badges */
.badge {
    font-weight: 500;
    border-radius: 6px;
    padding: 0.4em 0.8em;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--bs-border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    background: var(--bs-body-bg);
    position: relative;
    min-height: 200px;
}

.upload-area:hover {
    border-color: var(--staging-primary);
    background-color: rgba(230, 126, 34, 0.05);
}

.upload-area.dragover {
    border-color: var(--staging-primary);
    background-color: rgba(230, 126, 34, 0.1);
    transform: scale(1.02);
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    cursor: pointer;
}

.img-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Staging Interface */
.staging-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.staging-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.staging-item.selected {
    border-color: var(--staging-primary);
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
    background: rgba(230, 126, 34, 0.05);
}

.item-checkbox {
    transform: scale(1.3);
    border-radius: 4px;
}

.selected-items-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 0.75rem;
    background: var(--bs-body-bg);
}

.selected-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: var(--staging-primary);
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.selected-item-badge .remove-btn {
    background: none;
    border: none;
    color: white;
    padding: 0;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.selected-item-badge .remove-btn:hover {
    opacity: 1;
}

/* Dashboard Stats */
.stats-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Load Lists */
.load-list-card {
    transition: all 0.2s ease;
}

.load-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.item-preview {
    max-height: 120px;
    overflow-y: auto;
}

/* Image Gallery */
.image-gallery .main-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.image-gallery .main-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border: 1px solid var(--bs-border-color);
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.thumbnail:hover {
    border-color: var(--staging-primary);
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--staging-primary);
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
}

/* Progress Bars */
.progress {
    border-radius: 8px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--staging-primary) 0%, var(--staging-secondary) 100%);
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.alert-dismissible .btn-close {
    filter: brightness(0.8);
}

/* Tables */
.table th {
    font-weight: 600;
    border-top: none;
    border-bottom: 2px solid var(--bs-border-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(230, 126, 34, 0.05);
}

/* Modal Enhancements */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 16px 16px 0 0;
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
    border-radius: 0 0 16px 16px;
}

/* Responsive Design */

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        min-height: var(--mobile-touch-target);
        padding: 0.5rem 1rem;
    }
    
    .form-control, .form-select {
        min-height: var(--mobile-touch-target);
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .upload-area {
        padding: 1.5rem 1rem;
        min-height: 150px;
    }
    
    .staging-item .card-body {
        padding: 0.75rem;
    }
    
    .table-responsive {
        border-radius: 8px;
    }
    
    /* Stack cards on mobile */
    .item-card {
        margin-bottom: 1rem;
    }
    
    /* Larger touch targets for mobile */
    .item-checkbox {
        transform: scale(1.5);
        margin: 0.5rem;
    }
    
    .btn-group .btn {
        padding: 0.5rem;
    }
    
    /* Mobile navigation adjustments */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    /* Mobile modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .staging-item .card-img-top {
        height: 180px;
    }
}

/* Kiosk Mode */
.kiosk-mode {
    font-size: var(--kiosk-font-size);
}

.kiosk-mode .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    min-height: 50px;
}

.kiosk-mode .form-control, 
.kiosk-mode .form-select {
    padding: 0.75rem;
    font-size: 1.1rem;
    min-height: 50px;
}

.kiosk-mode .card-title {
    font-size: 1.2rem;
}

.kiosk-mode .staging-item .card-img-top {
    height: 250px;
}

.kiosk-mode .upload-area {
    min-height: 300px;
    padding: 3rem;
}

.kiosk-mode .item-checkbox {
    transform: scale(1.6);
}

.kiosk-mode .badge {
    font-size: 0.9rem;
    padding: 0.5em 1em;
}

.kiosk-mode .btn-group .btn {
    padding: 0.75rem 1rem;
}

.kiosk-mode .navbar-brand {
    font-size: 1.5rem;
}

.kiosk-mode .nav-link {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

/* Large screen kiosk adjustments */
@media (min-width: 1200px) {
    .kiosk-mode .container-fluid {
        max-width: 1600px;
    }
    
    .kiosk-mode .col-lg-3 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .kiosk-mode .staging-item .card-img-top {
        height: 300px;
    }
}

/* Print Styles */
@media print {
    .btn, .breadcrumb, .modal, .navbar {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .badge {
        border: 1px solid currentColor;
        color: #000 !important;
        background: transparent !important;
    }
    
    .container-fluid {
        max-width: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .table {
        page-break-inside: auto;
    }
    
    .table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

/* Accessibility Improvements */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 2px solid var(--staging-primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Error States */
.error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bs-text-muted);
}

.error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Success States */
.success-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--bs-success);
}

/* Animation Utilities */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--staging-primary) 0%, var(--staging-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--staging-primary) 0%, var(--staging-secondary) 100%);
}

.shadow-soft {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.border-radius-lg {
    border-radius: 12px;
}

.border-radius-xl {
    border-radius: 16px;
}
