.agenda-container {
    max-width: 600px;
    align-items: stretch;
    gap: 16px;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-bottom: 8px;
}

.logo-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.header-logo {
    height: 40px;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.reserva-title {
    margin: 0;
    font-size: 1.2rem;
    color: #4a4a4a;
    font-weight: 600;
}

.back-button {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 8px 16px;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.back-button:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.booking-step {
    background: var(--white);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
    animation: slideUp 0.5s ease-out;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.booking-step.hidden {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

.booking-step h3 {
    margin-bottom: 16px;
    color: var(--text-color);
    font-size: 1.2rem;
}

.hidden {
    display: none !important;
}

/* --- Services --- */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--white);
    border: 2px solid #ffd3da;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-deselect {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #999999;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.btn-deselect:hover {
    background: #ff4d4d;
}

.service-card.selected .btn-deselect {
    display: flex;
}

.service-card:hover {
    box-shadow: 0 4px 12px rgba(234, 85, 153, 0.1);
}

.service-card.selected {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 4px 12px rgba(234, 85, 153, 0.2);
}

.service-info {
    flex: 1;
    padding-right: 24px;
}

.service-info h4 {
    color: var(--primary-color);
    margin-bottom: 4px;
    font-size: 1rem;
}

.service-info p {
    font-size: 0.85rem;
    color: #666;
}

.service-price {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* --- Custom Calendar & Time Selector --- */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.month-title {
    color: var(--primary-color) !important;
    font-size: 1.25rem !important;
    text-transform: capitalize;
    font-weight: 600;
    margin: 0 !important;
}

.month-nav {
    display: flex;
    gap: 8px; /* adjusted gap to look tighter for circles */
}

.nav-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(234, 85, 153, 0.05);
}

.calendar-carousel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    width: 100%;
}

.day-nav-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #a0a0a0;
    cursor: pointer;
    padding: 0 2px;
    font-weight: 300;
    transition: color 0.3s ease;
}

.day-nav-btn:hover {
    color: var(--primary-color);
}

.days-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding-bottom: 5px;
}
.days-container::-webkit-scrollbar { display: none; }

.day-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
}

.day-card .day-name {
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 2px;
    text-transform: capitalize;
}

.day-card .day-num {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.day-card.selected {
    background: var(--primary-color);
}

.day-card.selected .day-name,
.day-card.selected .day-num {
    color: var(--white);
}

.day-card:hover:not(.selected) {
    background: #fcfcfc;
}

/* --- Time Sections --- */
.time-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: slideUp 0.4s ease-out;
}

.time-sections.hidden {
    display: none;
}

.section-divider {
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.section-divider::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: #e0e0e0;
    margin-left: 12px;
}

.time-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.time-slot {
    padding: 10px 16px;
    background: var(--white);
    border: 2px solid #ffd3da;
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.time-slot:hover {
    border-color: #f7a2ae;
}

.time-slot.selected {
    border-color: var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(234, 85, 153, 0.2);
    font-weight: 600;
}

.alert-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #444;
    margin-top: 10px;
    text-align: center;
}

/* --- Details Form --- */
.details-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.phone-input-wrapper {
    display: flex;
    align-items: stretch;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.phone-input-wrapper:focus-within {
    border-color: var(--primary-color);
}

.phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f8f9fa;
    color: #666;
    font-weight: 600;
    border-right: 1px solid #ddd;
    font-size: 1rem;
    user-select: none;
}

.phone-input-wrapper input {
    border: none !important;
    border-radius: 0 !important;
    flex-grow: 1;
}

.submit-btn {
    padding: 16px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: var(--shadow);
}

.submit-btn:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.submit-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(234, 85, 153, 0.4);
}

.time-slot:disabled, .time-slot.taken {
    background: #f0f0f0 !important;
    border-color: #ddd !important;
    color: #ccc !important;
    cursor: not-allowed !important;
    text-decoration: line-through;
    box-shadow: none !important;
}

/* === PAYMENT MODAL === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.payment-modal-box {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90%;
    overflow-y: auto;
}

.two-col-modal {
    max-width: 800px;
}

.transfer-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .transfer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

.modal-overlay:not(.hidden) .payment-modal-box {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-close-modal:hover { color: var(--text-color); }

.modal-summary {
    background: #fdf5f7;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.modal-summary h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 4px;
}
.modal-datetime-details p {
    margin: 2px 0;
    font-size: 0.85rem;
    color: #555;
}

.modal-section {
    margin-bottom: 24px;
}
.modal-section h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 16px;
}

.payment-amount-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-amount-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--white);
    border: 2px solid #ffd3da;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.payment-amount-card:hover {
    box-shadow: 0 4px 12px rgba(234, 85, 153, 0.1);
}
.payment-amount-card.selected {
    border-color: var(--primary-color);
    background: #fffafa;
    box-shadow: 0 4px 12px rgba(234, 85, 153, 0.2);
}

.payment-amount-card.selected .btn-deselect {
    display: flex;
}

.check-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
}
.payment-amount-card.selected .check-circle {
    border-color: var(--primary-color);
    background: var(--primary-color);
}
.payment-amount-card.selected .check-circle::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%) rotate(45deg);
}

.payment-amount-info h4 {
    color: var(--text-color);
    margin-bottom: 4px;
    font-size: 1.05rem;
}
.payment-amount-card.selected .payment-amount-info h4 {
    color: var(--primary-color);
}
.payment-amount-info p {
    font-size: 0.85rem;
    color: #777;
}

.disabled-section {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.3s;
}

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

.method-btn {
    padding: 12px;
    background: var(--white);
    border: 2px solid #ffd3da;
    border-radius: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}
.method-btn:hover {
    border-color: #f7a2ae;
}
.method-btn.selected {
    border-color: var(--primary-color);
    background: #fff0f3;
}
.method-btn.disabled-feature {
    opacity: 0.55;
    background: #fdfdfd;
    cursor: default;
    position: relative;
}
.badge-proximamente {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    background: #f1f1f1;
    color: #888;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 6px;
    vertical-align: middle;
}
.tooltip-proximamente {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-color);
    color: var(--white);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.tooltip-proximamente::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 5px 5px 5px;
    border-style: solid;
    border-color: transparent transparent var(--text-color) transparent;
}
.tooltip-proximamente.show-tooltip {
    opacity: 1;
}

.method-btn.selected {
    border-color: var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(234, 85, 153, 0.2);
    font-weight: 600;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 32px;
}

.modal-disclaimer {
    font-size: 0.8rem;
    color: #888;
    margin-top: 12px;
    text-align: center;
}

/* === TRANSFER MODAL === */
.bank-details-container {
    background: #fdf5f7;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.bank-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ffd3da;
}

.bank-detail-text {
    font-size: 0.95rem;
    color: var(--text-color);
}
.bank-detail-text strong {
    font-weight: 500;
    font-size: 0.8rem;
    color: #888;
    margin-right: 4px;
}

.btn-copy {
    background: var(--white);
    border: 1px solid #ffd3da;
    border-radius: 8px;
    color: var(--primary-color);
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy svg {
    width: 15px;
    height: 15px;
}

.btn-copy:hover {
    background: var(--primary-color);
    color: var(--white);
}
.btn-copy.success {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-copy-all {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 12px;
    width: 100%;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--primary-color);
}
.btn-copy-all:hover {
    background: #fdf5f7;
}
.btn-copy-all.success {
    background: #28a745;
    border-color: #28a745;
    color: white;
}
.btn-copy-all.success .copy-all-hint {
    color: #e0e0e0;
}
.copy-all-main {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
}
.copy-all-hint {
    font-size: 0.75rem;
    color: #888;
    text-align: center;
}

.file-upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed #ffd3da;
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-box:hover {
    background: #fffafa;
    border-color: #f7a2ae;
}

.file-upload-box.has-file {
    border: 2px solid var(--primary-color);
    background: #fdf5f7;
}

.upload-icon {
    margin-bottom: 12px;
}

#file-upload-text {
    font-size: 0.95rem;
    color: #555;
    pointer-events: none;
}

/* Mobile Bottom Sheet Modal */
@media (max-width: 600px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    
    .payment-modal-box {
        border-radius: 24px 24px 0 0;
        max-width: 100%;
        margin: 0;
        transform: translateY(100%);
        padding: 0px 20px 0px; /* Paddings are transferred to sticky children */
        display: flex;
        flex-direction: column;
    }
    
    .modal-overlay:not(.hidden) .payment-modal-box {
        transform: translateY(0);
    }

    .transfer-grid, 
    .transfer-col-left, 
    .transfer-col-right {
        display: contents !important;
    }

    .bank-details-container {
        margin-bottom: 30px !important;
    }

    .transfer-confirmation-check {
        padding-top: 24px;
    }

    .modal-header {
        position: sticky;
        top: 0;
        background: var(--white);
        padding: 24px 0 16px 0;
        z-index: 10;
    }

    .submit-btn {
        width: 100%; /* El boton es bloque expandido para mejor usabilidad con el pulgar */
    }
    
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: var(--white);
        padding: 24px 0 32px; /* Pad interior solido asegurando cobertura */
        margin-top: 16px;
        border-top: 1px solid rgba(0,0,0,0.05); /* Separacion translucida que previene mezcla de textos cuando hace scroll */
        z-index: 10;
    }
}

.group-title {
    width: 100%;
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: var(--primary-color);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.service-desc {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
    margin-bottom: 4px;
    line-height: 1.3;
}

/* Accordion Styles */
.group-accordion {
    margin-bottom: 12px;
    background: transparent;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    cursor: pointer;
    background: transparent;
    transition: opacity 0.2s;
    border-bottom: 1px solid #eee;
}

.accordion-header:hover {
    opacity: 0.8;
}

.accordion-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    position: relative;
    transition: transform 0.3s ease;
}

.accordion-icon::before, .accordion-icon::after {
    content: '';
    position: absolute;
    background: var(--primary-color);
    border-radius: 2px;
}

.accordion-icon::before {
    top: 9px; left: 2px; width: 16px; height: 2px;
}

.accordion-icon::after {
    top: 2px; left: 9px; width: 2px; height: 16px;
}

.group-accordion.expanded .accordion-icon {
    transform: rotate(180deg);
}

.group-accordion.expanded .accordion-icon::after {
    display: none;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease, margin 0.4s ease;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-accordion.expanded .accordion-content {
    max-height: 3000px; /* High enough to fit content */
    padding: 16px 0;
    overflow: visible;
}

/* --- New Card Layout Overrides --- */
.service-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.card-header h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1rem;
    flex: 1;
    padding-right: 12px;
}

.service-price {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

.service-desc {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.3;
    width: 100%;
}

.service-duration {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
}

/* Revert service-card to flex layout for desktop */
.service-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    padding: 16px;
}

.service-info {
    flex: 1;
    padding-right: 24px;
}

.service-info h4 {
    color: var(--primary-color);
    margin: 0 0 4px 0;
    font-size: 1rem;
    padding-right: 0;
}

.service-price {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
    position: static;
}

.service-desc {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 4px 0;
    line-height: 1.3;
    width: 100%;
}

.service-duration {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
}

/* Mobile Layout Overrides */
@media (max-width: 600px) {
    .service-card {
        flex-direction: column;
        align-items: flex-start;
        position: relative;
    }
    
    .service-info {
        padding-right: 0;
        width: 100%;
    }
    
    .service-info h4 {
        padding-right: 80px; /* Leave space for absolute price */
    }
    
    .service-price {
        position: absolute;
        top: 16px;
        right: 16px;
    }
}

/* Disable accordion interaction when a service is selected */
body.service-selected .accordion-header {
    pointer-events: none;
}

body.service-selected .accordion-icon {
    opacity: 0.3; /* Visually indicate it is disabled */
}

/* Discount Input Styles */
.discount-input-group {
    display: flex;
    gap: 8px;
}

#discount-msg.success {
    color: #4CAF50;
}

#discount-msg.error {
    color: #ff4d4d;
}

.price-crossed {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-right: 8px;
}

.price-discounted {
    color: var(--primary-color);
}
