/* BlueRabbit - Inspection Flow Styles */

/* ========================================
   INSPECTION PROGRESS
   ======================================== */

.inspection-progress {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    z-index: 40;
}

.progress-bar {
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.progress-text {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-1);
}

.pt-header-progress {
    padding-top: calc(60px + 40px);
}

/* ========================================
   INSPECTION SECTIONS
   ======================================== */

.inspection-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-4);
    overflow: hidden;
}

.section-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-hover);
}

.section-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.section-desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.section-questions {
    padding: var(--space-4);
}

/* ========================================
   SECTION PHOTOS
   ======================================== */

.section-photos {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--color-border);
}

.section-photos-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.section-photo-count {
    font-size: var(--text-xs);
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.section-photo-count:empty {
    display: none;
}

.section-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.section-photo-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.section-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.section-photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.section-photo-thumb:hover .section-photo-remove,
.section-photo-thumb:active .section-photo-remove {
    opacity: 1;
}

/* Always show on touch devices */
@media (hover: none) {
    .section-photo-remove {
        opacity: 1;
    }
}

.section-photo-actions {
    display: flex;
    gap: var(--space-2);
}

.section-photo-actions .btn {
    flex: 1;
    min-width: 0;
}

.section-photo-actions .btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ========================================
   QUESTION FIELDS
   ======================================== */

.question-field {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--color-border);
}

.question-field:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.question-label {
    display: block;
    font-weight: var(--font-medium);
    margin-bottom: var(--space-2);
}

.required-mark {
    color: var(--color-error);
    margin-left: 4px;
}

.question-help {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.question-extras {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.question-extras .btn.active {
    color: var(--color-primary);
}

.question-photos {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: var(--color-surface-hover);
    border-radius: var(--radius-md);
}

.question-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.question-photo-grid:empty {
    display: none;
}

.question-photo-actions {
    display: flex;
    gap: var(--space-2);
}

.question-photo-actions .btn {
    flex: 1;
    min-width: 0;
}

.question-photo-badge {
    font-size: var(--text-xs);
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    margin-left: 2px;
}

.question-photo-badge:empty {
    display: none;
}

.question-note {
    margin-top: var(--space-3);
}

/* GPS Capture */
.gps-capture {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.gps-display {
    flex: 1;
    padding: var(--space-3);
    background: var(--color-surface-hover);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

/* Barcode Capture */
.barcode-capture {
    display: flex;
    gap: var(--space-2);
}

.barcode-capture .form-input {
    flex: 1;
}

/* ========================================
   INSPECTION RESPONSES
   ======================================== */

.responses-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.response-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.response-item.flagged {
    border-left: 4px solid var(--color-error);
}

.response-question {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

.response-value {
    font-weight: var(--font-medium);
    word-break: break-word;
    overflow-wrap: break-word;
}

.response-note {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border);
}

/* ========================================
   ISSUE DETAIL
   ======================================== */

.issue-header,
.wo-header {
    margin-bottom: var(--space-4);
}

.issue-header h2,
.wo-header h2 {
    margin: var(--space-2) 0;
}

.issue-desc,
.wo-desc {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

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

.action-buttons {
    display: flex;
    gap: var(--space-3);
}

.action-buttons .btn {
    flex: 1;
}

/* ========================================
   PROFILE
   ======================================== */

.profile-header {
    text-align: center;
    padding: var(--space-6) 0;
}

.profile-name {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-top: var(--space-3);
}

.profile-email {
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

/* ========================================
   SETTINGS
   ======================================== */

.settings-group {
    padding: var(--space-2) 0;
}

.settings-title {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}

/* ========================================
   AUTH
   ======================================== */

.auth-container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.auth-header h1 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-2);
}

/* ========================================
   WORK ORDER TYPE ICONS
   ======================================== */

.wo-type-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wo-type-icon svg {
    width: 20px;
    height: 20px;
}

.wo-type-icon.routine {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-success);
}

.wo-type-icon.preventive {
    background: rgba(67, 97, 238, 0.15);
    color: var(--color-primary);
}

.wo-type-icon.corrective {
    background: rgba(250, 204, 21, 0.15);
    color: #ca8a04;
}

.wo-type-icon.emergency {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
}

/* ========================================
   ASSET THUMBNAIL
   ======================================== */

.asset-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

/* ========================================
   HEADER ACTIONS
   ======================================== */

.header-actions {
    display: flex;
    gap: var(--space-2);
}
