/**
 * Frontend Styles for THS Consultation Management
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.ths-consultation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ths-consultation-container * {
    box-sizing: border-box;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.consultation-heading {
    font-size: 2.2em;
    font-weight: 600;
    margin: 0 0 30px;
    color: #2c3e50;
    line-height: 1.3;
}

.consultation-subheading {
    font-size: 1.5em;
    font-weight: 500;
    margin: 0 0 20px;
    color: #34495e;
}

.consultation-text {
    font-size: 1em;
    line-height: 1.6;
    color: #555;
    margin: 0 0 15px;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.consultation-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.consultation-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.consultation-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.consultation-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.consultation-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.consultation-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.consultation-card-title {
    font-size: 1.3em;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
}

.consultation-card-meta {
    font-size: 0.9em;
    color: #7f8c8d;
    margin: 5px 0 0;
}

.consultation-card-body {
    margin-bottom: 20px;
}

.consultation-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* ==========================================================================
   Status Indicators
   ========================================================================== */

.consultation-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.consultation-status.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.consultation-status.status-completed {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.consultation-status.status-expired {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.consultation-status.status-scheduled {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Progress bars */
.consultation-progress {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 10px 0;
}

.consultation-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.consultation-progress-text {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.consultation-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.consultation-btn-primary {
    background: #3498db;
    color: #fff;
}

.consultation-btn-primary:hover {
    background: #2980b9;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.consultation-btn-secondary {
    background: #95a5a6;
    color: #fff;
}

.consultation-btn-secondary:hover {
    background: #7f8c8d;
    color: #fff;
}

.consultation-btn-success {
    background: #27ae60;
    color: #fff;
}

.consultation-btn-success:hover {
    background: #229954;
    color: #fff;
}

.consultation-btn-warning {
    background: #f39c12;
    color: #fff;
}

.consultation-btn-warning:hover {
    background: #e67e22;
    color: #fff;
}

.consultation-btn-danger {
    background: #e74c3c;
    color: #fff;
}

.consultation-btn-danger:hover {
    background: #c0392b;
    color: #fff;
}

.consultation-btn-outline {
    background: transparent;
    border: 2px solid currentColor;
}

.consultation-btn-large {
    padding: 15px 30px;
    font-size: 1.1em;
}

.consultation-btn-small {
    padding: 8px 15px;
    font-size: 0.85em;
}

.consultation-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.consultation-nav {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 30px;
}

.consultation-nav-list {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.consultation-nav-item {
    margin: 0;
}

.consultation-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
}

.consultation-nav-link:hover,
.consultation-nav-link.active {
    background: #007cba;
    color: #fff;
    text-decoration: none;
}

.consultation-nav-badge {
    background: #dc3545;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 5px;
}

/* Mobile navigation */
.consultation-mobile-nav {
    display: none;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 20px;
}

.consultation-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px;
    background: none;
    border: none;
    font-size: 1em;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

.consultation-mobile-menu {
    display: none;
    padding: 0 15px 15px;
}

.consultation-mobile-menu .consultation-nav-list {
    flex-direction: column;
    gap: 5px;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.consultation-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.consultation-table th,
.consultation-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.consultation-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.consultation-table tbody tr:hover {
    background: #f8f9fa;
}

.consultation-table tbody tr:last-child td {
    border-bottom: none;
}

.consultation-table .table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.consultation-table .table-actions .consultation-btn {
    padding: 6px 12px;
    font-size: 0.8em;
}

/* Responsive table */
.consultation-table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.consultation-form {
    background: #fff;
    padding: 30px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.consultation-form-group {
    margin-bottom: 25px;
}

.consultation-form-group:last-child {
    margin-bottom: 0;
}

.consultation-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
}

.consultation-form-label.required::after {
    content: " *";
    color: #e74c3c;
}

.consultation-form-input,
.consultation-form-textarea,
.consultation-form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    background: #fff;
}

.consultation-form-input:focus,
.consultation-form-textarea:focus,
.consultation-form-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.consultation-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.consultation-form-help {
    margin-top: 5px;
    font-size: 0.85em;
    color: #7f8c8d;
    line-height: 1.4;
}

.consultation-form-error {
    margin-top: 5px;
    font-size: 0.85em;
    color: #e74c3c;
    line-height: 1.4;
}

.consultation-form-row {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
}

/* File upload */
.consultation-file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.consultation-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.consultation-file-upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.consultation-file-upload:hover .consultation-file-upload-label {
    background: #e9ecef;
    border-color: #adb5bd;
}

.consultation-file-upload.dragover .consultation-file-upload-label {
    background: #e7f3ff;
    border-color: #3498db;
    color: #2980b9;
}

.selected-files-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 10px;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
}

.file-size {
    color: #7f8c8d;
    font-size: 0.85em;
    margin-left: 10px;
}

.remove-file-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.remove-file-btn:hover {
    background: #c0392b;
}

/* ==========================================================================
   Modals
   ========================================================================== */

#consultation-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.consultation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.consultation-modal .modal-content,
.consultation-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}

.consultation-modal .modal-header,
.consultation-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.consultation-modal .modal-header h2,
.consultation-modal-title {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #2c3e50;
}

.consultation-modal .modal-close,
.consultation-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.consultation-modal .modal-close:hover,
.consultation-modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.consultation-modal .modal-body,
.consultation-modal-body {
    padding: 30px;
}

.consultation-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* ==========================================================================
   Notices and Alerts
   ========================================================================== */

.consultation-notice {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.consultation-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.consultation-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.consultation-notice-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.consultation-notice-info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.consultation-notice p {
    margin: 0;
    font-weight: 500;
}

.notice-dismiss {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
    color: inherit;
}

.notice-dismiss:hover {
    opacity: 1;
}

/* ==========================================================================
   Statistics and Metrics
   ========================================================================== */

.consultation-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.consultation-stat-card {
    background: #fff;
    padding: 25px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.consultation-stat-card:hover {
    transform: translateY(-2px);
}

.consultation-stat-number {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0 0 10px;
    color: #2c3e50;
    line-height: 1;
}

.consultation-stat-label {
    font-size: 0.9em;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.consultation-stat-trend {
    margin-top: 10px;
    font-size: 0.85em;
}

.consultation-stat-trend.positive {
    color: #27ae60;
}

.consultation-stat-trend.negative {
    color: #e74c3c;
}

/* ==========================================================================
   Filters and Search
   ========================================================================== */

.consultation-filters {
    background: #f8f9fa;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 30px;
}

.consultation-filters-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.consultation-filter-group {
    flex: 1;
    min-width: 200px;
}

.consultation-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
    font-size: 0.9em;
}

.consultation-search-box {
    position: relative;
}

.consultation-search-box input {
    padding-left: 40px;
}

.consultation-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 1.1em;
}

/* ==========================================================================
   Calendly Modal Specific Styles
   ========================================================================== */

#ths-calendly-modal.ths-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

#ths-calendly-modal .ths-modal-content.calendly-modal {
    background-color: #fff;
    margin: 2% auto;
    border: none;
    border-radius: 8px;
    width: 95%;
    max-width: 1000px;
    height: 85vh;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
}

#ths-calendly-modal .ths-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

#ths-calendly-modal .ths-modal-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: #2c3e50;
    font-weight: 600;
}

#ths-calendly-modal .ths-modal-close {
    color: #7f8c8d;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#ths-calendly-modal .ths-modal-close:hover,
#ths-calendly-modal .ths-modal-close:focus {
    color: #e74c3c;
    background-color: #f8f9fa;
    transform: scale(1.1);
}

#ths-calendly-modal .ths-modal-body {
    padding: 0;
    height: calc(85vh - 80px);
    overflow: hidden;
}

#ths-calendly-modal #calendly-embed-container {
    height: 100%;
    width: 100%;
}

#ths-calendly-modal #calendly-embed-container .calendly-inline-widget {
    width: 100% !important;
    height: 100% !important;
    border: none;
}

#ths-calendly-modal #calendly-embed-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    border-radius: 0 0 8px 8px;
}

/* Loading state for Calendly modal */
.calendly-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7f8c8d;
    font-size: 1.1em;
}

.calendly-loading .consultation-loading-spinner {
    margin-right: 15px;
}

/* Modal animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Calendly Modal */
@media (max-width: 1024px) {
    #ths-calendly-modal .ths-modal-content.calendly-modal {
        width: 98%;
        height: 90vh;
        margin: 1% auto;
    }
    
    #ths-calendly-modal .ths-modal-body {
        height: calc(90vh - 80px);
    }
}

@media (max-width: 768px) {
    #ths-calendly-modal .ths-modal-content.calendly-modal {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    #ths-calendly-modal .ths-modal-header {
        border-radius: 0;
        padding: 15px 20px;
    }
    
    #ths-calendly-modal .ths-modal-header h2 {
        font-size: 1.2em;
    }
    
    #ths-calendly-modal .ths-modal-body {
        height: calc(100vh - 70px);
    }
    
    #ths-calendly-modal #calendly-embed-container iframe {
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    #ths-calendly-modal .ths-modal-header {
        padding: 12px 15px;
    }
    
    #ths-calendly-modal .ths-modal-header h2 {
        font-size: 1.1em;
    }
    
    #ths-calendly-modal .ths-modal-close {
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    
    #ths-calendly-modal .ths-modal-body {
        height: calc(100vh - 60px);
    }
}

/* Loading states */
.consultation-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #7f8c8d;
}

.consultation-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: consultation-spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes consultation-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Document Management
   ========================================================================== */

.consultation-documents {
    margin-top: 30px;
}

.consultation-document-list {
    display: grid;
    gap: 15px;
}

.consultation-document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.consultation-document-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.consultation-document-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.consultation-document-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: #495057;
}

.consultation-document-details h4 {
    margin: 0 0 5px;
    font-size: 1em;
    font-weight: 600;
    color: #2c3e50;
}

.consultation-document-meta {
    font-size: 0.85em;
    color: #7f8c8d;
}

.consultation-document-actions {
    display: flex;
    gap: 10px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .ths-consultation-container {
        padding: 15px;
    }
    
    .consultation-heading {
        font-size: 1.8em;
    }
    
    .consultation-grid-2,
    .consultation-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .consultation-card {
        padding: 20px;
    }
    
    .consultation-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .consultation-nav {
        display: none;
    }
    
    .consultation-mobile-nav {
        display: block;
    }
    
    .consultation-form-row {
        grid-template-columns: 1fr;
    }
    
    .consultation-filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .consultation-filter-group {
        min-width: auto;
    }
    
    .consultation-modal {
        padding: 10px;
    }
    
    .consultation-modal-content {
        max-height: 95vh;
    }
    
    .consultation-modal-header,
    .consultation-modal-body,
    .consultation-modal-footer {
        padding: 20px;
    }
    
    .consultation-table {
        font-size: 0.9em;
    }
    
    .consultation-table th,
    .consultation-table td {
        padding: 10px;
    }
    
    .consultation-table .table-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .consultation-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .consultation-stat-card {
        padding: 20px;
    }
    
    .consultation-stat-number {
        font-size: 2em;
    }
    
    .consultation-document-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .consultation-document-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ths-consultation-container {
        padding: 10px;
    }
    
    .consultation-heading {
        font-size: 1.5em;
    }
    
    .consultation-card {
        padding: 15px;
    }
    
    .consultation-btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    
    .consultation-modal-header,
    .consultation-modal-body,
    .consultation-modal-footer {
        padding: 15px;
    }
    
    .consultation-stats {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .consultation-btn,
    .consultation-modal,
    .consultation-filters,
    .consultation-nav,
    .consultation-mobile-nav {
        display: none !important;
    }
    
    .consultation-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .ths-consultation-container {
        padding: 0;
    }
    
    .consultation-table {
        box-shadow: none;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.consultation-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.consultation-btn:focus,
.consultation-form-input:focus,
.consultation-form-textarea:focus,
.consultation-form-select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.consultation-nav-link:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .consultation-card {
        border-width: 2px;
    }
    
    .consultation-btn {
        border: 2px solid currentColor;
    }
    
    .consultation-form-input,
    .consultation-form-textarea,
    .consultation-form-select {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .consultation-loading-spinner {
        animation: none;
    }
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */

.ths-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.ths-modal-content {
    background-color: #fff;
    margin: 5% auto;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.ths-modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.ths-modal-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: #2c3e50;
}

.ths-modal-close {
    color: #7f8c8d;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ths-modal-close:hover,
.ths-modal-close:focus {
    color: #e74c3c;
    background-color: #f8f9fa;
}

.ths-modal-body {
    padding: 25px;
}

/* Consultation Details Styles */
.consultation-simple-details .product-info {
    margin-bottom: 25px;
}

.consultation-simple-details .product-info h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.3em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.consultation-simple-details .product-description {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    margin-top: 0;
    line-height: 1.6;
}

.consultation-simple-details .calls-info h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.2em;
    /* border-bottom: 1px solid #e9ecef; */
    /* padding-bottom: 8px; */
}

.consultation-simple-details .calls-info h5 {
    margin: 20px 0 15px 0;
    color: #34495e;
    font-size: 1.1em;
}

/* Consultation Summary */
.consultation-summary {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.consultation-summary .call-stats,
.consultation-summary .call-duration-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.consultation-summary .call-duration-info {
    margin-bottom: 0;
}

.consultation-summary .stat {
    background-color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 0.9em;
    white-space: nowrap;
}

.consultation-summary .stat strong {
    color: #2c3e50;
}

/* Scheduled Calls */
.calls-simple-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.call-simple-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.2s ease;
}

.call-simple-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.1);
}

.call-simple-item > div {
    margin-bottom: 5px;
    font-size: 0.9em;
}

.call-simple-item > div:last-child {
    margin-bottom: 0;
}

.call-simple-item strong {
    color: #2c3e50;
}

/* No Calls Scheduled */
.no-calls-scheduled {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
}

.no-calls-scheduled p {
    margin: 0 0 10px 0;
    color: #856404;
}

.no-calls-scheduled p:last-child {
    margin: 0;
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .ths-modal-content {
        margin: 2% auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .ths-modal-header,
    .ths-modal-body {
        padding: 15px;
    }
    
    .consultation-summary .call-stats,
    .consultation-summary .call-duration-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .consultation-summary .stat {
        text-align: center;
    }
}