/* InspectionStyles.css */

/* Global Styles */
:root {
    --primary-color: #006699;
    --primary-light: #e6f2f8;
    --gray-light: #f5f5f5;
    --gray-medium: #cccccc;
    --gray-dark: #666666;
    --text-dark: #333333;
    --white: #ffffff;
}

/* Tab Navigation */
.tabs-container {
    display: flex;
    background-color: var(--primary-light);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab {
    padding: 12px 18px;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease;
}

    .tab:hover {
        background-color: rgba(0, 102, 153, 0.1);
    }

    .tab.active {
        background-color: var(--primary-color);
        color: var(--white);
        font-weight: 600;
    }

/* Progress Bar */
.subnav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.progress-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

    .progress-info span {
        font-size: 14px;
        color: var(--gray-dark);
    }

.progress-bar {
    height: 8px;
    width: 200px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #4a86e8;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Records List Container */
.records-list-container {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

    .list-header h2 {
        font-size: 24px;
        font-weight: 600;
        color: var(--primary-color);
        margin: 0;
    }

    .list-header .btn-primary {
        padding: 8px 16px;
        font-size: 14px;
        font-weight: 500;
    }

/* Action Cell */
.action-cell {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Main Content */
.main-content-inspection {
    /* padding: 20px; */
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.item-header {
    background-color: var(--primary-light);
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
}

    .item-header h2 {
        font-size: 18px;
        font-weight: bold;
        color: var(--text-dark);
        margin: 0;
    }

.item-content {
    background-color: #f9f9f9;
    border: 1px solid var(--gray-medium);
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

    .item-content h3 {
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 10px;
    }

.item-description p {
    margin-bottom: 10px;
}

/* Child Items */
.child-item {
    border: 1px solid var(--gray-medium);
    margin-bottom: 20px;
    background-color: var(--white);
    border-radius: 4px;
    overflow: hidden;
}

.child-item-header {
    padding: 15px 20px;
}

    .child-item-header h4 {
        font-size: 14px;
        font-weight: bold;
        margin: 0;
    }

.child-item-options {
    display: flex;
    gap: 20px;
    padding: 15px 20px;
    background-color: #f9f9f9;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

    .radio-option input[type="radio"] {
        margin: 0;
        width: 20px;
        height: 20px;
        cursor: pointer;
    }

    .radio-option .radio-label {
        font-weight: 500;
    }

.comment-section {
    padding: 15px 20px;
    border-top: 1px solid #dddddd;
}

    .comment-section label {
        display: block;
        margin-bottom: 10px;
        color: var(--gray-dark);
        font-size: 12px;
        font-weight: 500;
    }

    .comment-section textarea {
        width: 100%;
        min-height: 60px;
        border: 1px solid var(--gray-medium);
        border-radius: 4px;
        padding: 8px;
        outline: none;
        resize: vertical;
        font-family: Arial, sans-serif;
        font-size: 14px;
    }

        .comment-section textarea:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(0, 102, 153, 0.2);
        }

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn {
    font-weight: 500;
}

.navigation-buttons {
    display: flex;
    gap: 10px;
}

/* Table Overrides */
.table-primary {
    background-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
}

th, td {
    vertical-align: middle !important;
}

/* Loading States */
.loading-container, .no-items-container {
    padding: 40px;
    text-align: center;
    color: var(--gray-dark);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .tabs-container {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1 0 auto;
    }

    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .action-cell {
        flex-direction: column;
    }

    .table-responsive {
        margin-bottom: 0;
    }
}


/* Tabs Navigation Styles */
.tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.tab {
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    position: relative;
}

    .tab:hover {
        background-color: #f8f9fa;
    }

    .tab.active {
        background-color: #115aa4;
        color: white;
    }

    .tab .status-badge {
        margin-left: 0.5rem;
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
        border-radius: 1rem;
        font-weight: 400;
    }

/* Status Indicators */
.status-badge.status-complete {
    background-color: #198754;
    color: white;
}

.status-badge.status-partial {
    background-color: #ffc107;
    color: #212529;
}

.status-badge.status-not-started {
    background-color: #dee2e6;
    color: #212529;
}

/* Progress Dashboard */
.progress-dashboard {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.progress-header {
    margin-bottom: 0.5rem;
}

.progress {
    height: 0.75rem;
    border-radius: 1rem;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 1rem;
}

/* Accordion-style Inspection Items */
.inspection-items-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inspection-item {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

    .inspection-item:hover {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

    .inspection-item.border-complete {
        border-left: 5px solid #198754;
    }

    .inspection-item.border-partial {
        border-left: 5px solid #ffc107;
    }

    .inspection-item.border-not-started {
        border-left: 5px solid #dee2e6;
    }

.inspection-item-header {
    padding: 1rem;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

    .inspection-item-header:hover {
        background-color: #f8f9fa;
    }

    .inspection-item-header.active {
        background-color: #f0f0f0;
        border-bottom: 1px solid #dee2e6;
    }

    .inspection-item-header .status-indicator {
        width: 2rem;
        height: 2rem;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f8f9fa;
    }

        .inspection-item-header .status-indicator.status-complete {
            color: #198754;
        }

        .inspection-item-header .status-indicator.status-partial {
            color: #ffc107;
        }

        .inspection-item-header .status-indicator.status-not-started {
            color: #adb5bd;
        }

.item-number {
    font-weight: 600;
    margin-right: 0.5rem;
    color: #6c757d;
}

.item-title {
    font-weight: 500;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.item-completion {
    font-size: 0.875rem;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.inspection-item-content {
    padding: 1.5rem;
    background-color: #fff;
}

.item-description {
    margin-bottom: 2rem;
    color: #495057;
}

/* Child Items */
.child-items-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.child-item {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    padding: 1.25rem;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}

.child-item-answered {
    border-left: 4px solid #198754;
}

.child-item-unanswered {
    border-left: 4px solid #dee2e6;
}

.child-item:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.075);
}

.child-item-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.child-status-indicator {
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .child-status-indicator.status-complete {
        color: #198754;
    }

    .child-status-indicator.status-not-started {
        color: #adb5bd;
    }

.child-item-content {
    padding: 0.5rem;
    background-color: #fff;
    border-radius: 0.25rem;
}

.comment-section {
    margin-top: 1rem;
}

    .comment-section textarea {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid #ced4da;
        border-radius: 0.25rem;
        min-height: 100px;
        margin-top: 0.5rem;
    }

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    align-items: center;
}

.primary-actions {
    display: flex;
    gap: 0.75rem;
}

.navigation-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Records List */
.records-list-container {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}


.action-cell {
    min-width: 250px;
}

    .action-cell .action-buttons {
        margin-top: 0;
        justify-content: center;
        gap: 0.5rem;
    }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .tabs-container {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .primary-actions, .navigation-buttons {
        width: 100%;
    }

    .action-cell {
        min-width: auto;
    }

        .action-cell .btn {
            padding: 0.25rem 0.5rem;
            font-size: 0.75rem;
        }
}


/* CSS for auto-save functionality */
.radio-group-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

    .radio-option input[type="radio"] {
        margin: 0;
    }

.radio-label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

    .radio-label.text-muted {
        cursor: not-allowed;
    }

/* Child item styling */
.child-item-content .form-group {
    margin-bottom: 1rem;
}

.comment-section {
    margin-top: 1rem;
}

    .comment-section label {
        font-weight: 500;
        margin-bottom: 0.5rem;
        display: block;
    }

    .comment-section textarea {
        min-height: 80px;
        resize: vertical;
    }

/* Navigation buttons styling */
.navigation-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

    .navigation-buttons .btn {
        min-width: 120px;
    }

/* Status indicators */
.child-item-answered {
    border-left: 4px solid #28a745;
}

.child-item-unanswered {
    border-left: 4px solid #6c757d;
}

.status-complete {
    color: #28a745;
}

.status-not-started {
    color: #6c757d;
}
