/* =============================================
    CRMNG - Checklist Styles
    ============================================= */

/* Checklist List Page Styles */
.check-checklist-table-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.check-checklist-table {
    width: 100%;
    border-collapse: collapse;
}

.check-checklist-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap;
}

.check-checklist-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.check-checklist-table tr:hover {
    background: #f8f9fa;
}

.check-action-cell {
    white-space: nowrap;
}

.check-action-cell .check-action-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.check-action-cell .check-action-btn {
    margin: 0;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    min-width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Checklist Builder Styles */
.check-checklistbuilder-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 2rem;
    margin: 0 auto;
}

.check-apartment-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 1rem;
}

.check-apartment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.check-apartment-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px 15px 0 0;
    padding: 1rem;
    border-bottom: 3px solid #128C7E;
}

.check-apartment-details {
    padding: 1rem;
}

.check-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f3f4;
    gap: 0.5rem;
    align-items: center;
}

.check-detail-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.check-detail-row input {
    flex: 1;
    margin-right: 0.5rem;
}

.check-detail-row input[type="number"] {
    width: 100px !important;
    flex: none;
}

/* Enhanced button visibility for checklist builder */
.check-checklistbuilder-container .check-btn {
    margin: 0.25rem;
    min-width: 120px;
}

.check-checklistbuilder-container .check-btn-primary {
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
}

.check-checklistbuilder-container .check-btn-outline-primary {
    border: 2px solid #128C7E !important;
    color: #128C7E !important;
    background: transparent !important;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
}

.check-checklistbuilder-container .check-btn-outline-danger {
    border: 2px solid #dc3545 !important;
    color: #dc3545 !important;
    background: transparent !important;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

.check-checklistbuilder-container .check-btn-outline-secondary {
    border: 2px solid #6c757d !important;
    color: #6c757d !important;
    background: transparent !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

/* Ensure form controls are properly sized */
.check-checklistbuilder-container .check-form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.5rem;
}

.check-checklistbuilder-container .check-form-control:focus {
    border-color: #128C7E;
    box-shadow: 0 0 0 0.2rem rgba(18, 140, 126, 0.25);
}

/* Section styling */
.check-checklistbuilder-container .check-section-title {
    color: #212529;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Ensure the add question button is prominent */
.check-checklistbuilder-container .check-btn-add-question {
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(7, 94, 84, 0.2);
}

.check-checklistbuilder-container .check-btn-add-question:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 94, 84, 0.3);
}

/* Checklist History Styles */
.check-history-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    margin-bottom: 2rem;
}

.check-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.check-history-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.check-history-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.check-history-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 1rem;
    border-left: 4px solid #128C7E;
}

.check-history-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.check-history-card-header {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
}

.check-history-card-body {
    padding: 1rem;
}

.check-history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.check-history-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.check-history-status.completed {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.check-history-status.pending {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.check-history-status.failed {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.check-history-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Checklist Player Styles */
.check-player-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    margin-bottom: 2rem;
}

.check-player-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.check-player-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.check-player-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

.check-progress-section {
    margin-bottom: 2rem;
}

.check-progress-bar {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

.check-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
    transition: width 0.3s ease;
}

.check-progress-text {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.check-question-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #128C7E;
}

.check-question-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
}

.check-question-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.check-option-label {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
}

.check-option-label:hover {
    border-color: #128C7E;
    background: rgba(18, 140, 126, 0.05);
}

.check-option-label input[type="radio"],
.check-option-label input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
}

.check-option-text {
    font-weight: 500;
    color: #495057;
}

.check-player-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.check-player-actions .check-btn {
    min-width: 120px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Checklist Table Responsive */
    .check-checklist-table-container {
        margin: 0 -15px;
    }
    
    .check-checklist-table {
        font-size: 0.875rem;
    }
    
    .check-checklist-table th,
    .check-checklist-table td {
        padding: 0.5rem;
    }
    
    .check-action-cell .check-action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .check-action-cell .check-action-btn {
        width: 100%;
        justify-content: center;
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        min-width: 36px;
        height: 36px;
    }
    
    /* Hide some columns on very small screens */
    .check-checklist-table th:nth-child(3),
    .check-checklist-table td:nth-child(3) {
        display: none;
    }
    
    .check-checklist-table th:nth-child(4),
    .check-checklist-table td:nth-child(4) {
        display: none;
    }
    
    .check-checklist-table th:first-child,
    .check-checklist-table td:first-child {
        position: sticky;
        left: 0;
        background: #f8f9fa;
        z-index: 1;
    }
    
    /* Checklist Builder Responsive */
    .check-checklistbuilder-container {
        padding: 1.5rem;
    }
    
    .check-checklistbuilder-container .check-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* History Responsive */
    .check-history-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .check-history-filters {
        flex-wrap: wrap;
        width: 100%;
    }
    
    /* Player Responsive */
    .check-player-container {
        padding: 1.5rem;
    }
    
    .check-player-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .check-player-actions .check-btn {
        width: 100%;
    }
}

/* Medium screens */
@media (max-width: 992px) {
    .check-checklist-table-container {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .check-checklist-table-container .check-table-header {
        border-radius: 16px 16px 0 0;
    }
}

/* Ensure checklist responsive behavior works properly */
@media (max-width: 991.98px) {
    .check-checklist-table {
        display: none !important;
    }
    
    .checklist-mobile-view {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .checklist-mobile-view {
        display: none !important;
    }
    
    .check-checklist-table.d-lg-table {
        display: table !important;
    }
}

/* Mobile-specific button overrides */
.checklist-mobile-actions .btn-mobile {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.75rem !important;
    border-radius: 4px !important;
    min-width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.checklist-mobile-actions .btn-mobile i {
    font-size: 14px !important;
    margin: 0 !important;
}

/* Desktop-specific button overrides */
.check-action-cell .btn-desktop {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    border-radius: 6px !important;
    min-width: 80px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
}

.check-action-cell .btn-desktop i {
    font-size: 16px !important;
    margin-right: 6px !important;
}