/* Onigam Booking Public Styles */

/* Reset and Base Styles */
.onigam-booking-form * {
    box-sizing: border-box;
}

.onigam-booking-form {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
}

/* Container */
.onigam-booking-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

/* Step Headers */
.booking-step {
    padding: 30px;
    border-bottom: 1px solid #f0f2f5;
    transition: all 0.3s ease;
}

.booking-step:last-child {
    border-bottom: none;
}

.booking-step h3 {
    margin: 0 0 24px 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
}

.booking-step h3:before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #007cba, #005a87);
    margin-right: 12px;
    border-radius: 2px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.service-item {
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba, #00a0d2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-item:hover {
    border-color: #007cba;
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.15);
    transform: translateY(-2px);
}

.service-item:hover::before {
    transform: scaleX(1);
}

.service-item.selected {
    border-color: #007cba;
    background: linear-gradient(135deg, #f8fbff, #e8f4f8);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.2);
}

.service-item.selected::before {
    transform: scaleX(1);
}

.service-item h4 {
    margin: 0 0 12px 0;
    font-size: 1.25em;
    font-weight: 600;
    color: #1d2327;
}

.service-description {
    color: #646970;
    margin: 0 0 16px 0;
    line-height: 1.6;
    font-size: 0.95em;
}

.service-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f2f5;
}

.duration {
    color: #007cba;
    font-weight: 600;
    font-size: 0.9em;
    display: flex;
    align-items: center;
}

.duration::before {
    content: '🕐';
    margin-right: 6px;
}

.price {
    color: #00a32a;
    font-weight: 700;
    font-size: 1.1em;
}

/* Calendar Styles */
.calendar-container {
    max-width: 450px;
    margin: 0 auto;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 8px;
}

.calendar-header h4 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
    color: #1d2327;
}

.calendar-nav {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.calendar-nav:hover {
    background: linear-gradient(135deg, #005a87, #004060);
    transform: scale(1.05);
}

.calendar-nav:active {
    transform: scale(0.95);
}

.calendar-grid {
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.calendar-weekdays div {
    padding: 16px 8px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #e1e5e9;
}

.calendar-weekdays div:last-child {
    border-right: none;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #ffffff;
}

.calendar-day {
    padding: 16px 8px;
    text-align: center;
    border-right: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background: linear-gradient(135deg, #f0f8ff, #e8f4f8);
    color: #007cba;
}

.calendar-day.disabled {
    color: #c3c4c7;
    cursor: not-allowed;
    background: #f9f9f9;
}

.calendar-day.disabled:hover {
    background: #f9f9f9;
    color: #c3c4c7;
}

.calendar-day.selected {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    font-weight: 600;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.calendar-day.other-month {
    color: #c3c4c7;
    background: #f9f9f9;
}

/* Time Slots */
.time-slots-container {
    max-width: 600px;
    margin: 0 auto;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.time-slot {
    padding: 16px 12px;
    text-align: center;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.time-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #007cba, #00a0d2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.time-slot:hover {
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
}

.time-slot:hover::before {
    opacity: 0.1;
}

.time-slot.selected {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.time-slot.selected::before {
    opacity: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 0.95em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

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

/* Booking Summary */
.booking-summary {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #e1e5e9;
}

.booking-summary h4 {
    margin: 0 0 16px 0;
    color: #1d2327;
    font-size: 1.1em;
    font-weight: 600;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e5e9;
}

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

.summary-item strong {
    color: #1d2327;
    font-weight: 600;
}

.summary-item span {
    color: #646970;
    font-weight: 500;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    align-items: center;
}

.button-primary {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.button-primary:hover {
    background: linear-gradient(135deg, #005a87, #004060);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
}

.button-primary:active {
    transform: translateY(0);
}

.button-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.button-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-1px);
}

/* Confirmation Styles */
.confirmation-message {
    text-align: center;
    padding: 48px 24px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 24px;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.confirmation-message h3 {
    color: #28a745;
    margin-bottom: 16px;
    font-size: 1.5em;
    font-weight: 600;
}

.confirmation-message p {
    color: #646970;
    margin-bottom: 32px;
    line-height: 1.6;
    font-size: 1.05em;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    border: 3px solid #e1e5e9;
    border-top-color: #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error Messages */
.booking-error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 16px 20px;
    margin: 0 0 20px 0;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-step {
        padding: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .button-primary,
    .button-secondary {
        width: 100%;
        text-align: center;
    }
    
    .calendar-container {
        max-width: 100%;
    }
    
    .calendar-day {
        padding: 12px 4px;
        font-size: 0.9em;
        min-height: 44px;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .booking-step {
        padding: 16px;
    }
    
    .service-item {
        padding: 20px;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .time-slot {
        padding: 12px 8px;
        font-size: 0.9em;
    }
    
    .calendar-nav {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.booking-step:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .service-item,
    .time-slot,
    .calendar-day {
        border-width: 3px;
    }
    
    .service-item.selected,
    .time-slot.selected,
    .calendar-day.selected {
        border-width: 4px;
    }
}
