/* Acupuncture Booking - Frontend Styles */

/* Base Widget Styles */
.acu-booking-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    max-width: 800px;
    margin: 0 auto;
}

.acu-booking-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

/* Overlay Styles */
.acu-booking-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.acu-booking-overlay.active {
    display: block;
}

.acu-booking-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
}

.acu-booking-overlay-content {
    position: relative;
    max-width: 900px;
    margin: 50px auto;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 100000;
}

.acu-booking-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background 0.3s;
}

.acu-booking-close:hover {
    background: #f0f0f0;
}

/* Link Button */
.acu-booking-link-button {
    display: inline-block;
    padding: 12px 30px;
    background: #2c7a7b;
    color: #fff !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s;
}

.acu-booking-link-button:hover {
    background: #234e52;
}

/* Step Styles */
.acu-booking-step {
    display: none;
}

.acu-booking-step.active {
    display: block;
}

.acu-booking-step h2 {
    margin-top: 0;
    color: #2c7a7b;
    font-size: 28px;
}

.acu-back-button {
    background: #f0f0f0;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 14px;
}

.acu-back-button:hover {
    background: #e0e0e0;
}

/* Calendar Styles */
#acu-calendar-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.acu-date-option {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.acu-date-option:hover {
    border-color: #2c7a7b;
    background: #f0f9f9;
}

.acu-date-option.selected {
    background: #2c7a7b;
    color: #fff;
    border-color: #2c7a7b;
}

.acu-date-option .date-day {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.acu-date-option .date-month {
    font-size: 14px;
    display: block;
    margin-top: 5px;
}

/* Treatment Selector - Tab Style */
.acu-treatment-options {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.acu-treatment-option {
    flex: 1;
    min-width: 200px;
    display: block;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background: #fff;
}

.acu-treatment-option:hover {
    border-color: #2c7a7b;
    background: #f0f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 122, 123, 0.1);
}

.acu-treatment-option input[type="radio"] {
    display: none;
}

.acu-treatment-option input[type="radio"]:checked ~ .treatment-name,
.acu-treatment-option input[type="radio"]:checked ~ .treatment-price,
.acu-treatment-option input[type="radio"]:checked ~ .treatment-description {
    color: #2c7a7b;
}

.acu-treatment-option input[type="radio"]:checked + .treatment-name {
    color: #2c7a7b;
}

.acu-treatment-option:has(input[type="radio"]:checked) {
    border-color: #2c7a7b;
    background: #f0f9f9;
    border-width: 3px;
    box-shadow: 0 4px 12px rgba(44, 122, 123, 0.2);
}

.treatment-name {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.treatment-price {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: #2c7a7b;
    margin: 10px 0;
}

.treatment-description {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    line-height: 1.4;
}

.acu-treatment-selector label {
    cursor: pointer;
}

.acu-treatment-selector input[type="radio"] {
    display: none;
}

.treatment-option {
    display: block;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
}

.acu-treatment-selector input[type="radio"]:checked + .treatment-option {
    border-color: #2c7a7b;
    background: #f0f9f9;
}

.treatment-option strong {
    display: block;
    font-size: 18px;
    color: #2c7a7b;
    margin-bottom: 5px;
}

.treatment-price {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.treatment-option small {
    display: block;
    color: #666;
}

/* Time Slots */
#acu-timeslots-container {
    margin-top: 30px;
}

.acu-practitioner-column {
    margin-bottom: 30px;
}

.acu-practitioner-column h3 {
    color: #2c7a7b;
    border-bottom: 2px solid #2c7a7b;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.acu-timeslots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.acu-timeslot {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.acu-timeslot:hover {
    border-color: #2c7a7b;
    background: #f0f9f9;
}

.acu-timeslot.selected {
    background: #2c7a7b;
    color: #fff;
    border-color: #2c7a7b;
}

/* Form Styles */
.acu-form-group {
    margin-bottom: 20px;
}

.acu-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.acu-form-group input,
.acu-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.acu-form-group input:focus,
.acu-form-group textarea:focus {
    outline: none;
    border-color: #2c7a7b;
}

.acu-checkbox-group {
    margin: 20px 0;
}

.acu-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.acu-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: auto;
    cursor: pointer;
}

.acu-checkbox-label span {
    flex: 1;
    line-height: 1.5;
}

.acu-step3-summary {
    background: #f0f9f9;
    border: 2px solid #2c7a7b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.acu-step3-summary h3 {
    margin: 0 0 15px 0;
    color: #2c7a7b;
    font-size: 18px;
}

.acu-step3-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #d0e8e8;
}

.acu-step3-summary .summary-row:last-child {
    border-bottom: none;
}

.acu-step3-summary .summary-label {
    font-weight: 600;
    color: #555;
}

.acu-step3-summary .summary-price {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #2c7a7b;
    font-size: 18px;
    font-weight: bold;
    color: #2c7a7b;
}

.acu-submit-button {
    background: #2c7a7b;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.acu-submit-button:hover {
    background: #234e52;
}

/* Booking Summary */
.acu-booking-summary {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.acu-booking-summary h3 {
    margin-top: 0;
    color: #2c7a7b;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.summary-item.total {
    font-size: 18px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #2c7a7b;
}

/* Confirmation */
.acu-confirmation {
    text-align: center;
    padding: 40px 20px;
}

.acu-success-icon {
    width: 80px;
    height: 80px;
    background: #48bb78;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
}

.acu-close-button {
    background: #2c7a7b;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

/* Loading */
.acu-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.acu-info-message {
    text-align: center;
    padding: 30px;
    background: #f0f9f9;
    border: 2px dashed #2c7a7b;
    border-radius: 8px;
    color: #2c7a7b;
    font-weight: 500;
}

/* PayPal Button Container */
#paypal-button-container {
    margin-top: 20px;
}

/* Selected Date Display */
.acu-selected-date {
    background: #f0f9f9;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    color: #2c7a7b;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .acu-booking-container {
        padding: 20px;
    }

    .acu-treatment-selector {
        grid-template-columns: 1fr;
    }

    #acu-calendar-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .acu-booking-overlay-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
}
