/**
 * Mechanic App Styles
 * Additional styles for mechanic-specific components
 */

/* Job Cards */
.job-card {
    background: #2d3748;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #374151;
}

.job-card:hover,
.job-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
    background: #1a202c;
    border-bottom: 2px solid #4a5568;
}

.job-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fbbf24;
}

.job-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.job-card-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Card Sections */
.card-section {
    padding: 20px;
    border-bottom: 1px solid #374151;
}

.card-section:last-of-type {
    border-bottom: none;
}

.card-section-header {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-section-header i {
    font-size: 1.2rem;
}

.card-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.card-field {
    margin-bottom: 10px;
}

.card-field-label {
    font-size: 0.7rem;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-field-value {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 500;
    word-break: break-word;
}

/* Status Colors */
.status-scheduled {
    background: #e7f3ff;
    color: #0066cc;
}

.status-in-progress,
.status-in_progress {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d1e7dd;
    color: #0f5132;
}

.status-cancelled {
    background: #f8d7da;
    color: #842029;
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}

.filter-pills::-webkit-scrollbar {
    display: none;
}

.filter-pills input[type="radio"] {
    display: none;
}

.filter-pills label {
    padding: 10px 20px;
    border-radius: 20px;
    border: 2px solid #4a5568;
    background: #2d3748;
    color: #6c757d;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.filter-pills input[type="radio"]:checked + label {
    background: #fbbf24;
    color: #fff;
    border-color: #fbbf24;
}

.filter-pills label:active {
    transform: scale(0.95);
}

/* Pull to Refresh Indicator */
#ptr-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(251, 191, 36, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 0 0 20px 20px;
    z-index: 9999;
    transition: transform 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#ptr-indicator i {
    animation: spin 1s linear infinite;
}

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

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2d3748;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    padding: env(safe-area-inset-bottom, 0) 0 0;
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.75rem;
    min-height: 56px;
    transition: all 0.2s;
}

.bottom-nav .nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.bottom-nav .nav-item.active {
    color: #fbbf24;
}

.bottom-nav .nav-item:active {
    background: rgba(0, 0, 0, 0.05);
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 768px) {
    .toast-container {
        left: 20px;
        right: 20px;
    }
}

.toast {
    background: #2d3748;
    color: #ffffff;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    min-width: 250px;
    max-width: 400px;
    opacity: 1;
    transition: opacity 0.3s;
    border-left: 4px solid #fbbf24;
}

.toast.success {
    border-left-color: #198754;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

.toast.info {
    border-left-color: #0dcaf0;
}

.toast i {
    font-size: 1.25rem;
}

/* Loading Spinner */
#loading-spinner {
    text-align: center;
    padding: 40px 20px;
}

#loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Empty State */
#empty-state {
    text-align: center;
    padding: 60px 20px;
}

#empty-state i {
    font-size: 4rem;
    color: #4a5568;
    margin-bottom: 20px;
}

#empty-state h3 {
    color: #6c757d;
    font-size: 1.25rem;
    margin-bottom: 10px;
}

#empty-state p {
    color: #adb5bd;
}

/* Search Input */
.search-container {
    position: relative;
}

.search-container .form-control {
    padding-left: 44px;
    height: 52px;
    font-size: 1rem;
    border-radius: 12px;
}

.search-container i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.25rem;
}

/* App Header */
.app-header {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top, 0));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-header .btn-back {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.app-header .btn-back:hover,
.app-header .btn-back:active {
    background: rgba(255, 255, 255, 0.3);
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.app-header .badge {
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 12px;
}

/* Content Padding for Bottom Nav */
.content-wrapper {
    padding-bottom: 80px;
}

/* Touch Optimization */
@media (pointer: coarse) {
    .job-card {
        min-height: 56px;
    }
    
    .btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .form-control,
    .form-select {
        min-height: 52px;
        font-size: 1rem;
    }
}

/* Tablet Landscape */
@media (min-width: 768px) and (orientation: landscape) {
    .job-card {
        padding: 20px;
    }
    
    .filter-pills label {
        padding: 12px 24px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #374151;
    }

    .job-card {
        background: #1e293b;
        color: #374151;
        border-color: #334155;
    }
    
    .job-card-header {
        background: #0f172a;
        border-bottom-color: #334155;
    }
    
    .job-number,
    .job-card-title {
        color: #fbbf24;
    }

    .job-card p,
    .text-muted {
        color: #adb5bd !important;
    }
    
    .card-section {
        border-bottom-color: #334155;
    }
    
    .card-section-header {
        color: #fbbf24;
    }
    
    .card-field-label {
        color: #94a3b8;
    }
    
    .card-field-value {
        color: #374151;
    }
    
    .filter-pills label {
        background: #2d2d2d;
        border-color: #495057;
        color: #374151;
    }
    
    .filter-pills input[type="radio"]:checked + label {
        background: #fbbf24;
        color: #fff;
    }
    
    .bottom-nav {
        background: #2d2d2d;
        border-top: 1px solid #495057;
    }

    .bottom-nav-item {
        color: #adb5bd;
    }

    .bottom-nav-item.active {
        color: #fbbf24;
    }
    
    .app-header {
        background: linear-gradient(135deg, #f59e0b 0%, #084298 100%);
    }
}
/* Checklist Styles */
.checklist-category {
    padding: 12px 0;
    border-bottom: 1px solid #374151;
}

.checklist-category:last-child {
    border-bottom: none;
}

.category-header {
    font-size: 1rem;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 12px;
    text-transform: capitalize;
}

.task-item {
    padding: 8px 0;
}

/* Override Bootstrap form-check for compact checkbox layout */
.task-item.form-check {
    padding-left: 0 !important;
    margin-bottom: 8px;
    min-height: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-item .form-check-input {
    position: static !important;
    margin: 0 !important;
    cursor: pointer;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    float: none !important;
}

.task-item .form-check-label {
    font-size: 0.875rem;
    color: #495057;
    cursor: pointer;
    user-select: none;
    padding-left: 0 !important;
    margin-bottom: 0;
    line-height: 1.3;
}

.task-item .form-check-input:checked + .form-check-label {
    color: #198754;
    text-decoration: line-through;
}

.task-input {
    font-size: 0.875rem;
}

#checklist-loading {
    color: #6c757d;
}
/* Checklist Pagination */
.checklist-pagination {
    padding: 15px 0;
    border-top: 1px solid #374151;
}

.checklist-pagination .btn {
    min-width: 100px;
}

.checklist-pagination .text-muted {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Page-based Navigation System */
.detail-page {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.page-navigation {
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.page-navigation .btn {
    min-width: 110px;
}

#page-indicator {
    font-weight: 600;
    font-size: 0.95rem;
}
