/* Photo Viewer Modal - Split Screen Layout */

/* Split-screen layout for photo modal */
.photo-modal-split {
    display: flex;
    height: 100vh;
    flex-direction: row;
}

/* Left column - Image viewer */
.photo-viewer-left {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    overflow: hidden;
}

/* Right column - Labeling sidebar */
.photo-viewer-right {
    width: 300px;
    flex-shrink: 0;
    background: #ffffff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
}

/* Sidebar header */
.sidebar-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-header h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}


/* Bib input section */
.bib-input-section {
    margin: 2rem 0;
}

.bib-input-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
    display: block;
}

.bib-input-field {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease;
}

.bib-input-field:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    outline: none;
}

.bib-input-field.has-ai-value {
    background-color: #f8f9fa;
    border-color: #198754;
}

.ai-detected-label {
    font-size: 0.75rem;
    color: #198754;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Action buttons */
.labeling-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.btn-confirm-bib {
    background: #198754;
    border: 1px solid #198754;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-confirm-bib:hover {
    background: #157347;
    border-color: #146c43;
}

.btn-no-bib {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-no-bib:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

/* Photo metadata */
.photo-metadata {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.metadata-item {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.metadata-label {
    font-weight: 500;
    color: #6c757d;
    margin-right: 0.5rem;
}

.metadata-value {
    color: #333;
}

/* Keyboard shortcuts hint */
.shortcuts-hint {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.shortcuts-hint h6 {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.shortcut-key {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 0.125rem 0.25rem;
    font-family: monospace;
    font-size: 0.7rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .photo-modal-split {
        flex-direction: column;
        height: 100vh;
    }
    
    .photo-viewer-left {
        flex: 1;
        min-height: 60vh;
    }
    
    .photo-viewer-right {
        width: 100%;
        max-height: 40vh;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        padding: 1rem;
    }
    
    .sidebar-header h6 {
        font-size: 0.9rem;
    }
    
    .bib-input-field {
        font-size: 1.1rem;
        padding: 0.6rem 0.8rem;
    }
    
    .labeling-actions {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .btn-confirm-bib,
    .btn-no-bib {
        flex: 1;
        padding: 0.6rem 0.8rem;
        font-size: 0.875rem;
    }
}

/* Small screen adjustments */
@media (max-width: 480px) {
    .photo-viewer-right {
        padding: 0.75rem;
    }
    
    .sidebar-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .bib-input-section {
        margin-bottom: 1rem;
    }
    
    .shortcuts-hint {
        padding: 0.5rem;
        margin-top: 0.75rem;
    }
}

/* Focus states for accessibility */
.btn-confirm-bib:focus,
.btn-no-bib:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    outline: none;
}

/* Loading state for bib input */
.bib-input-field:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
}

/* Success/error states */
.bib-input-field.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 1.94 1.94L8.5 4.41l-.94-.94L4.25 6.78z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.bib-input-field.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4M8.2 4.6l-1.4 1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}