/* Modal Base Styles */
.search-modal,
.appointment-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.modal-close {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #e74c3c;
}
.modal-body {
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
    height: 700px;
}

/* Search Modal Specific Styles */
.search-modal .modal-content {
    max-width: 500px;
}

.modal-search-form {
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #fff;
}

.modal-search-form .search-field {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1rem;
    font-size: 1rem;
    outline: none;
    color: #2c3e50;
}

.modal-search-form .search-field::placeholder {
    color: #95a5a6;
}

.modal-search-form .search-submit {
    background: #3498db;
    border: none;
    color: #fff;
    padding: 1rem;
    cursor: pointer;
    border-radius: 10px;
    margin: 4px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.modal-search-form .search-submit:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.search-suggestions {
    margin-top: 1rem;
}

.search-hint {
    color: #7f8c8d;
    font-size: 0.875rem;
    margin: 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

/* Modal responsive styles */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-width: none;
        width: calc(100% - 2rem);
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.125rem;
    }
    
    .search-input-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-search-form .search-field {
        padding: 0.75rem;
    }
    
    .modal-search-form .search-submit {
        width: 100%;
        margin: 0;
        border-radius: 8px;
        padding: 0.75rem;
    }
}

/* Body class when modal is open */
body.modal-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .search-modal,
    .appointment-modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
        border-radius: 8px;
    }
}
