/* ===================================
   BOOKING MODAL OVERLAY STYLES
   =================================== */

/* Modal Overlay */
.booking-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
    pointer-events: none; /* Não bloquear cliques quando fechado */
}

.booking-modal-overlay.active {
    display: flex;
    pointer-events: auto; /* Permitir cliques quando aberto */
}

/* Modal Container */
.booking-modal-container {
    background: white;
    border-radius: 20px;
    width: 98%;
    max-width: 1400px;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Modal Header */
.booking-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.modal-logo img {
    height: 40px;
    /*filter: brightness(0) invert(1);*/
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
    flex: 1;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Content */
.booking-modal-content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Importante para flex scroll */
}

/* Progress Bar */
.booking-progress {
    margin-bottom: 30px;
    flex-shrink: 0; /* Não encolher */
}

.progress-bar {
    background: #e9ecef;
    height: 6px;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    width: 20%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .step-circle {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

.progress-step.active .step-label {
    color: #333;
    font-weight: 600;
}

/* Modal Steps */
.modal-step {
    display: none !important;
    animation: fadeInSlide 0.4s ease-out;
    flex: 1;
    min-height: 0; /* Importante para flex scroll */
    overflow-y: auto;
}

.modal-step.active {
    display: flex !important;
    flex-direction: column;
}

.step-header {
    text-align: center;
    margin-bottom: 25px;
    flex-shrink: 0; /* Não encolher */
}

.step-header h3 {
    color: #333;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-header p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Services Grid Modal */
.services-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.service-card-modal {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.service-card-modal:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.service-card-modal.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.service-icon-modal {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.service-icon-modal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-icon-modal i {
    font-size: 1.8rem;
    color: #667eea;
}

.service-card-modal.selected .service-icon-modal {
    background: rgba(255, 255, 255, 0.2);
}

.service-card-modal.selected .service-icon-modal i {
    color: white;
}

.service-info-modal {
    flex: 1;
}

.service-info-modal h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #667eea;
}

.service-info-modal p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

.service-card-modal.selected .service-info-modal p {
    color: rgba(255, 255, 255, 0.9);
}

.service-card-modal.selected .service-info-modal h4 {
    color: rgba(255, 255, 255, 0.9);
}

.service-price-modal {
    display: flex;
    align-items: center;
    gap: 15px;
}

.service-price-modal .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.service-card-modal.selected .service-price-modal .price {
    color: white;
}

.service-price-modal .duration {
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #666;
}

.service-card-modal.selected .service-price-modal .duration {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.service-check {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.service-card-modal.selected .service-check {
    display: flex;
}

/* Therapists Grid Modal */
.therapists-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.therapist-card-modal {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.therapist-card-modal:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.therapist-card-modal.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.therapist-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid #f8f9fa;
}

.therapist-card-modal.selected .therapist-photo {
    border-color: rgba(255, 255, 255, 0.3);
}

.therapist-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.therapist-avatar-modal {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.therapist-card-modal.selected .therapist-avatar-modal {
    background: rgba(255, 255, 255, 0.2);
}

.therapist-card-modal.selected .therapist-info-modal h4 {
    color: white;
}

.therapist-info-modal h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #667eea;
}

.therapist-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #28a745;
    font-size: 0.9rem;
}

.therapist-card-modal.selected .therapist-status {
    color: rgba(255, 255, 255, 0.9);
}

.therapist-status i {
    font-size: 0.6rem;
}

.therapist-check {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.therapist-card-modal.selected .therapist-check {
    display: flex;
}

/* DateTime Selection Modal */
.datetime-selection-modal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.date-section,
.time-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.date-section h4,
.time-section h4 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    flex-shrink: 0;
}

.modal-calendar {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    flex: 1;
    overflow-y: auto;
}

/* jQuery UI Datepicker Overrides for Contrast */
.modal-calendar .ui-datepicker {
    background: white !important;
    border: none !important;
    padding: 10px !important;
    width: 100% !important;
}

.modal-calendar .ui-datepicker-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 10px !important;
    margin-bottom: 10px !important;
}

.modal-calendar .ui-datepicker-title {
    color: white !important;
    font-weight: 600 !important;
}

.modal-calendar .ui-datepicker-prev,
.modal-calendar .ui-datepicker-next {
    color: white !important;
    cursor: pointer !important;
}

.modal-calendar .ui-datepicker-prev:hover,
.modal-calendar .ui-datepicker-next:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
}

.modal-calendar .ui-datepicker-calendar {
    margin-top: 10px !important;
    width: 100% !important;
    table-layout: fixed !important;
}

.modal-calendar .ui-datepicker-calendar th {
    color: #333 !important;
    font-weight: 600 !important;
    padding: 8px 4px !important;
    text-align: center !important;
    font-size: 0.85rem !important;
}

.modal-calendar .ui-datepicker-calendar td {
    padding: 3px !important;
    text-align: center !important;
}

.modal-calendar .ui-datepicker-calendar td a,
.modal-calendar .ui-datepicker-calendar td span {
    background: white !important;
    color: #333 !important;
    border: 1px solid #e9ecef !important;
    text-align: center !important;
    padding: 8px 4px !important;
    border-radius: 8px !important;
    display: block !important;
    font-weight: 500 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.modal-calendar .ui-datepicker-calendar td a:hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.modal-calendar .ui-datepicker-calendar td .ui-state-active {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.modal-calendar .ui-datepicker-calendar td .ui-state-highlight {
    background: #fff3cd !important;
    color: #856404 !important;
    border-color: #ffc107 !important;
}

.modal-calendar .ui-datepicker-calendar td .ui-state-disabled {
    background: #f8f9fa !important;
    color: #ccc !important;
    opacity: 0.5 !important;
}

.modal-calendar .ui-datepicker-other-month {
    opacity: 0.3 !important;
}

.time-slots-modal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
    flex: 1;
    min-height: 0;
}

.time-slot-modal {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    color: #333 !important;
}

.time-slot-modal:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.time-slot-modal.selected {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.time-slot-modal.unavailable {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666 !important;
}

.loading-message i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #667eea !important;
}

.loading-message p {
    color: #666 !important;
    margin: 10px 0 0 0 !important;
}

/* Client Form Modal */
.client-form-modal {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

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

.form-group-modal {
    display: flex;
    flex-direction: column;
}

.form-group-modal label {
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group-modal input,
.form-group-modal textarea {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white !important;
    color: #333 !important;
}

.form-group-modal input:focus,
.form-group-modal textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white !important;
    color: #333 !important;
}

.form-group-modal input::placeholder,
.form-group-modal textarea::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

.form-group-modal textarea {
    resize: vertical;
    min-height: 80px;
}

/* Booking Summary Modal */
.booking-summary-modal {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 12px 15px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.summary-header h4 {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: none;
    font-size: 0.9rem;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .label {
    color: #666;
    font-weight: 500;
}

.summary-item .value {
    color: #333;
    font-weight: 600;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 0;
    margin-top: 8px;
    border-top: 1px solid #dee2e6;
    font-size: 1rem;
}

.summary-total .label {
    color: #333;
    font-weight: 700;
}

.summary-total .value {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Payment Methods */
.payment-methods {
    flex-shrink: 0;
}

.payment-methods h4 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.payment-option {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.payment-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
}

.payment-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: pulsePayment 0.3s ease-out;
}

@keyframes pulsePayment {
    0% {
        transform: translateY(-2px) scale(1);
    }
    50% {
        transform: translateY(-2px) scale(1.05);
    }
    100% {
        transform: translateY(-2px) scale(1.02);
    }
}

.payment-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #667eea;
}

.payment-option.selected .payment-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.payment-info {
    flex: 1;
}

.payment-info h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.payment-option.selected .payment-info h5 {
    color: white;
}

.payment-info p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.payment-option.selected .payment-info p {
    color: rgba(255, 255, 255, 0.9);
}

.payment-check {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.payment-option.selected .payment-check {
    display: flex;
}

/* Modal Feedback Area */
.modal-feedback {
    padding: 15px 30px;
    background: white;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    display: none;
}

.modal-feedback.show {
    display: block;
}

.modal-feedback-content {
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInFeedback 0.3s ease-out;
}

.modal-feedback-content.error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.modal-feedback-content.success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.modal-feedback-content.warning {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    color: #664d03;
}

.modal-feedback-content.info {
    background: #cff4fc;
    border: 1px solid #b6effb;
    color: #055160;
}

.modal-feedback-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.modal-feedback-message {
    flex: 1;
    font-weight: 500;
}

.modal-feedback-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-feedback-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

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

/* Modal Navigation */
.modal-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-top: 2px solid #e9ecef;
    background: white;
    flex-shrink: 0; /* Não encolher */
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

.btn-modal-prev,
.btn-modal-next,
.btn-modal-finish {
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-modal-prev {
    background: #6c757d;
    color: white;
}

.btn-modal-prev:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-modal-next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-modal-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-modal-next:disabled {
    background: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-modal-finish {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-modal-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* Custom Scrollbar */
.booking-modal-content::-webkit-scrollbar,
.modal-step::-webkit-scrollbar,
.services-grid-modal::-webkit-scrollbar,
.therapists-grid-modal::-webkit-scrollbar,
.datetime-selection-modal::-webkit-scrollbar,
.time-slots-modal::-webkit-scrollbar,
.client-form-modal::-webkit-scrollbar,
.modal-calendar::-webkit-scrollbar {
    width: 8px;
}

.booking-modal-content::-webkit-scrollbar-track,
.modal-step::-webkit-scrollbar-track,
.services-grid-modal::-webkit-scrollbar-track,
.therapists-grid-modal::-webkit-scrollbar-track,
.datetime-selection-modal::-webkit-scrollbar-track,
.time-slots-modal::-webkit-scrollbar-track,
.client-form-modal::-webkit-scrollbar-track,
.modal-calendar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.booking-modal-content::-webkit-scrollbar-thumb,
.modal-step::-webkit-scrollbar-thumb,
.services-grid-modal::-webkit-scrollbar-thumb,
.therapists-grid-modal::-webkit-scrollbar-thumb,
.datetime-selection-modal::-webkit-scrollbar-thumb,
.time-slots-modal::-webkit-scrollbar-thumb,
.client-form-modal::-webkit-scrollbar-thumb,
.modal-calendar::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.booking-modal-content::-webkit-scrollbar-thumb:hover,
.modal-step::-webkit-scrollbar-thumb:hover,
.services-grid-modal::-webkit-scrollbar-thumb:hover,
.therapists-grid-modal::-webkit-scrollbar-thumb:hover,
.datetime-selection-modal::-webkit-scrollbar-thumb:hover,
.time-slots-modal::-webkit-scrollbar-thumb:hover,
.client-form-modal::-webkit-scrollbar-thumb:hover,
.modal-calendar::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

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

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

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-modal-container {
        margin: 10px;
        max-height: 95vh;
    }

    .booking-modal-header {
        padding: 20px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .booking-modal-content {
        padding: 20px;
    }

    .services-grid-modal,
    .therapists-grid-modal {
        grid-template-columns: 1fr;
    }

    .service-card-modal {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .datetime-selection-modal {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form-row-modal {
        grid-template-columns: 1fr;
    }

    .payment-options {
        grid-template-columns: 1fr;
    }

    .modal-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .btn-modal-prev,
    .btn-modal-next,
    .btn-modal-finish {
        width: 100%;
        justify-content: center;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 10px;
    }

    .step-circle {
        width: 35px;
        height: 35px;
    }

    .step-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .booking-modal-overlay {
        padding: 10px;
    }

    .booking-modal-header {
        padding: 15px;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .booking-modal-content {
        padding: 15px;
    }

    .step-header h3 {
        font-size: 1.5rem;
    }

    .time-slots-modal {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

/* ===================================
   ADDITIONAL CONTRAST FIXES
   =================================== */

/* Ensure all text inputs have proper contrast */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    background-color: white !important;
    color: #333 !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    background-color: white !important;
    color: #333 !important;
}

/* Ensure time slots are always visible */
.time-slots-modal .time-slot-modal {
    background-color: white !important;
    color: #333 !important;
}

.time-slots-modal .time-slot-modal:hover {
    background-color: #667eea !important;
    color: white !important;
}

.time-slots-modal .time-slot-modal.selected {
    background-color: #667eea !important;
    color: white !important;
}

.time-slots-modal .time-slot-modal.unavailable {
    background-color: #f8f9fa !important;
    color: #999 !important;
}

/* Ensure calendar dates are visible */
.ui-datepicker-calendar td a,
.ui-datepicker-calendar td span {
    color: #333 !important;
}

/* Ensure form labels are visible */
.form-group-modal label {
    color: #333 !important;
}

/* Ensure summary text is visible */
.summary-item .label,
.summary-item .value,
.summary-total .label,
.summary-total .value {
    color: #333 !important;
}

.summary-total .value {
    color: #667eea !important;
}

/* Ensure all headings are visible */
.step-header h3,
.step-header p,
.date-section h4,
.time-section h4,
.summary-header h4,
.payment-methods h4 {
    color: #333 !important;
}

.step-header p {
    color: #666 !important;
}


/* Credit Card Form Modal */
.credit-card-form-modal {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.credit-card-form-modal .form-group-modal {
    display: flex;
    flex-direction: column;
}

.credit-card-form-modal .form-group-modal label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.credit-card-form-modal .form-control {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #2c3e50 !important;
}

.credit-card-form-modal .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.credit-card-form-modal .form-control::placeholder {
    color: #999;
}

/* Select específico - garantir que o texto seja visível */
.credit-card-form-modal select.form-control,
.credit-card-form-modal select#installments,
select#installments {
    color: #2c3e50 !important;
    background-color: white !important;
    -webkit-text-fill-color: #2c3e50 !important;
}

.credit-card-form-modal select.form-control option,
.credit-card-form-modal select#installments option,
select#installments option {
    color: #2c3e50 !important;
    background-color: white !important;
    -webkit-text-fill-color: #2c3e50 !important;
}

/* Remover classes que podem estar causando problema */
#installments.text-sm-left,
#installments.font-semibold {
    color: #2c3e50 !important;
}



.credit-card-form-modal .form-row-modal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.card-security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 8px;
    color: #004085;
    font-size: 0.9rem;
    margin-top: 10px;
}

.card-security-info i {
    color: #004085;
    font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .credit-card-form-modal .form-row-modal {
        grid-template-columns: 1fr;
    }
    
    .datetime-selection-modal {
        grid-template-columns: 1fr;
    }
}


/* Test Card Info */
.test-card-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    color: #1565c0;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.test-card-info i {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.test-card-info strong {
    font-weight: 600;
}


/* Modal Overlay para PIX e Processamento */
.modal-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-overlay-box {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalOverlaySlideIn 0.3s ease-out;
    color: #2c3e50;
}

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

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

.modal-overlay-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #2c3e50;
}

.modal-overlay-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-overlay-close:hover {
    background: #f8f9fa;
    color: #dc3545;
}

.modal-overlay-body {
    padding: 30px 20px;
    text-align: center;
    color: #2c3e50;
}

.modal-overlay-body p {
    color: #6c757d;
    margin: 10px 0;
}

.modal-overlay-body h4 {
    color: #2c3e50;
    margin: 15px 0;
}

.modal-overlay-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

/* Loading Spinner */
.modal-loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* PIX QR Code */
.pix-qr-code {
    margin: 20px auto;
    max-width: 300px;
}

.pix-qr-code img {
    width: 100%;
    height: auto;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

.pix-code-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    margin: 15px 0;
    text-align: center;
}

.pix-info-box {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    color: #004085;
}

.pix-info-box i {
    margin-right: 8px;
}

/* Success/Error Icons */
.modal-icon-success {
    color: #28a745;
    font-size: 4rem;
    margin-bottom: 20px;
}

.modal-icon-error {
    color: #dc3545;
    font-size: 4rem;
    margin-bottom: 20px;
}

.modal-icon-info {
    color: #17a2b8;
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Buttons */
.btn-modal-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-modal-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 10px;
}

.btn-modal-secondary:hover {
    background: #5a6268;
}

.btn-copy-pix {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
}

.btn-copy-pix:hover {
    background: #5568d3;
}

.btn-copy-pix.copied {
    background: #28a745;
}


/* Fix urgente para select de parcelas */
select[id="installments"],
#installments,
.modal-step[data-step="6"] select {
    color: #2c3e50 !important;
    -webkit-text-fill-color: #2c3e50 !important;
    opacity: 1 !important;
    background-color: white !important;
}

select[id="installments"] option,
#installments option,
.modal-step[data-step="6"] select option {
    color: #2c3e50 !important;
    background-color: white !important;
}
