/* Bootstrap 5.3 + Bootstrap Icons CDN loaded via _Host.cshtml */

/* Custom theme overrides for mobile-first pre-check app */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f5f7fa;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: var(--light-bg);
    padding-bottom: 70px; /* space for bottom nav */
}

/* Override list-group borders */
.list-group-flush > .list-group-item {
    border-left: none !important;
    border-right: none !important;
    border-top: 1px solid #f0f0f0 !important;
    border-bottom: none !important;
}

.list-group-flush > .list-group-item:last-child {
    border-bottom: 1px solid #f0f0f0 !important;
}

/* Card styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

/* Button overrides */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-pass {
    background-color: var(--success-color);
    color: white;
    flex: 1;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    transition: all 0.15s ease;
}

.btn-pass:hover, .btn-pass:active {
    background-color: #157347;
    color: white;
    transform: scale(0.98);
}

.btn-fail {
    background-color: var(--danger-color);
    color: white;
    flex: 1;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    transition: all 0.15s ease;
}

.btn-fail:hover, .btn-fail:active {
    background-color: #bb2d3b;
    color: white;
    transform: scale(0.98);
}

.btn-pass.checked {
    background-color: #157347;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.btn-fail.checked {
    background-color: #bb2d3b;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Check item card */
.check-item-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}

.check-item-card.passed {
    border-left: 4px solid var(--success-color);
}

.check-item-card.failed {
    border-left: 4px solid var(--danger-color);
}

.check-item-card.unanswered {
    border-left: 4px solid #dee2e6;
}

/* Equipment search */
.equipment-search-input {
    border-radius: 10px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.2s ease;
}

.equipment-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    outline: none;
}

.equipment-option {
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

.equipment-option:hover {
    background-color: #f0f4ff;
}

.equipment-option.selected {
    background-color: #e7f1ff;
    border-left: 3px solid var(--primary-color);
}

/* Modal overrides */
.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 20px;
}

/* Progress bar */
.progress {
    height: 6px;
    border-radius: 3px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Form controls */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 10px 14px;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* Badge */
.badge {
    font-weight: 500;
    padding: 5px 10px;
    font-size: 0.75rem;
}

/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

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

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

/* Safe area insets for notched phones */
.safe-area-top {
    padding-top: env(safe-area-inset-top);
}

.safe-area-bottom {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Photo preview */
.photo-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
    margin-top: 8px;
}

/* Scrollable content areas */
.scrollable-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* View mode result indicators */
.result-pass-icon {
    color: var(--success-color);
    font-size: 1.2rem;
}

.result-fail-icon {
    color: var(--danger-color);
    font-size: 1.2rem;
}

/* Equipment detail view header */
.view-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

/* Bottom nav active state */
.bottom-nav-active {
    color: var(--primary-color) !important;
}