/* Professional Schedule Link Component Styles */

/* Loading states and animations */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Select2 customizations for disabled schedules */
.select2-container--bootstrap-5 .select2-results__option[aria-disabled="true"] {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.select2-container--bootstrap-5 .select2-results__option[aria-disabled="true"]:hover {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
}

.select2-container--bootstrap-5 .select2-results__option[aria-disabled="true"] .fas {
    color: #dc3545 !important;
}

/* Visual feedback for unavailable schedules */
.schedule-unavailable {
    background-color: #fff5f5 !important;
    border-left: 4px solid #dc3545 !important;
}

.schedule-unavailable .fas {
    color: #dc3545 !important;
}

/* Form validation styling */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Required field indicator */
.form-label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* Link type badges */
.badge.bg-primary {
    background-color: #0d6efd !important;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #212529 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Icon containers */
.icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state .fas {
    opacity: 0.5;
}

.empty-state h5 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* Search input styling */
.search-container {
    position: relative;
}

.search-container .form-control {
    padding-right: 40px;
}

.search-container .btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Panel styling improvements */
.panel-body {
    padding: 1.5rem;
}

.panel-heading {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.panel-heading h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Action buttons styling */
.btn-group .btn {
    border-radius: 0.375rem;
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Table improvements */
.table th {
    border-top: none;
    font-weight: 600;
    background-color: #f8f9fa;
    color: #495057;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
}

.table-responsive {
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Hover effects */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.075);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    transition: all 0.15s ease-in-out;
}

/* Pagination styling */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* Card improvements */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    background-color: rgba(0, 0, 0, 0.03);
}

/* Form improvements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.form-text .fas {
    margin-right: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .panel-body {
        padding: 1rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-group .btn {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state .fas {
        font-size: 2rem !important;
    }
}

@media (max-width: 576px) {
    .panel-heading h4 {
        font-size: 1rem;
    }
    
    .panel-heading .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .pagination {
        font-size: 0.875rem;
    }
    
    .badge {
        font-size: 0.75rem;
    }
}
