/* Validation styling for pincode input */
#radiologyPincodeInput.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#radiologyPincodeInput.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.invalid-feedback.show {
    display: block;
}

/* Loading spinner styling */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Provider cards styling */
.provider-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef !important;
    margin-bottom: 1rem;
}

.provider-card:hover {
    /*transform: translateY(-3px);*/
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    /*border-color: #0a0a4f !important;*/
}

.provider-card .card-body {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 1rem;
}

.provider-card .card-title {
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.provider-card .card-text {
    font-size: 0.875rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.provider-card .badge {
    font-size: 0.75rem;
    padding: 0.4em 0.6em;
    border-radius: 6px;
}

.provider-card .btn {
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.provider-card .btn:hover {
    transform: translateY(-1px);
}

/* Responsive card layout */
@media (max-width: 768px) {
    .provider-card .card-body {
        padding: 0.75rem;
    }
    
    .provider-card .card-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .provider-card .card-text {
        font-size: 0.8rem;
    }
    
    .provider-card .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }
}

@media (max-width: 576px) {
    .provider-card .card-body {
        padding: 0.5rem;
    }
    
    .provider-card .card-title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .provider-card .card-text {
        font-size: 0.75rem;
    }
    
    .provider-card .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Success alert styling */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #c3e6cb;
    border-radius: 12px;
}

/* Modal styling - no main scroll */
#radiologyCentersModal .modal-dialog {
    max-height: 90vh;
    margin: 1.75rem auto;
}

#radiologyCentersModal .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

#radiologyCentersModal .modal-body {
    flex: 1;
    overflow: hidden;
    padding: 1.5rem;
    padding-bottom: 0;
}

#radiologyCentersModal .modal-header {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
}

#radiologyCentersModal .modal-footer {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    margin-top: 0;
}

/* Centers list scrollable area only */
#radiologyCentersList {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 0.5rem;
    padding-bottom: 2.5rem;
    margin-bottom: 1rem;
}

/* Custom scrollbar styling */
#radiologyCentersList::-webkit-scrollbar {
    width: 6px;
}

#radiologyCentersList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#radiologyCentersList::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#radiologyCentersList::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Fixed modal positioning */
.modal.fade .modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-width: 90%;
    width: 800px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal.fade .modal-dialog {
        width: 95%;
        max-height: 95vh;
        margin: 0.5rem auto;
    }
    
    #radiologyCentersModal .modal-content {
        max-height: 95vh;
    }
    
    #radiologyCentersModal .modal-header {
        padding: 0.75rem 1rem;
    }
    
    #radiologyCentersModal .modal-body {
        padding: 1rem;
        padding-bottom: 0;
    }
    
    #radiologyCentersModal .modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: row-reverse;
        gap: 0.5rem;
    }
    
    #radiologyCentersList {
        max-height: 250px;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* Show icon on tablet but smaller */
    .provider-card .col-auto {
        display: block !important;
    }
    
    .provider-card .col-auto .rounded-circle {
        width: 32px !important;
        height: 32px !important;
    }
    
    .provider-card .col {
        padding-left: 0.5rem;
    }
}

@media (max-width: 576px) {
    .modal.fade .modal-dialog {
        width: 95%;
        margin: 0.5rem auto;
    }
    
    #radiologyCentersModal .modal-header {
        padding: 0.75rem 1rem;
    }
    
    #radiologyCentersModal .modal-body {
        padding: 1rem;
        padding-bottom: 0;
    }
    
    #radiologyCentersModal .modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #radiologyCentersList {
        max-height: 220px;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Stack buttons vertically on mobile */
    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Show icon on mobile but smaller */
    .provider-card .col-auto {
        display: block !important;
    }
    
    .provider-card .col-auto .rounded-circle {
        width: 28px !important;
        height: 28px !important;
    }
    
    .provider-card .col {
        padding-left: 0.5rem;
    }
    
    /* Improve card spacing on mobile */
    .provider-card {
        margin-bottom: 0.75rem;
    }
    
    .provider-card .card-body {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .modal.fade .modal-dialog {
        width: 98%;
        margin: 0.25rem auto;
    }
    
    #radiologyCentersModal .modal-header {
        padding: 0.5rem 0.75rem;
    }
    
    #radiologyCentersModal .modal-body {
        padding: 0.75rem;
        padding-bottom: 0;
    }
    
    #radiologyCentersModal .modal-footer {
        padding: 0.5rem 0.75rem;
    }
    
    #radiologyCentersList {
        max-height: 180px;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }
}
