/**
 * Frontend Styles
 * File: assets/css/frontend-style.css
 */

/* Booking Wrapper */
.abp-booking-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Booking Steps */
.abp-booking-step {
    display: none;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.abp-booking-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.abp-booking-step h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-size: 28px;
}

/* Service Selection */
.abp-service-dropdown {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.abp-service-dropdown:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.abp-service-dropdown optgroup {
    font-weight: bold;
    color: #d4af37;
    padding: 10px;
}

.abp-selected-service-display {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
    border: 2px solid #d4af37;
    border-radius: 8px;
}

.abp-selected-service-display .service-info {
    font-size: 18px;
    margin-bottom: 10px;
}

.abp-selected-service-display .service-price {
    color: #d4af37;
    font-size: 24px;
    font-weight: bold;
}

/* Buttons */
.abp-btn {
    background: #d4af37;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    margin-top: 20px;
}

.abp-btn:hover:not(:disabled) {
    background: #b8941f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212,175,55,0.3);
}

.abp-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.abp-back-btn {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 14px;
}

.abp-back-btn:hover {
    background: #5a6268;
}

/* Calendar */
.abp-calendar-wrapper {
    margin: 30px 0;
}

.abp-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.abp-calendar-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.abp-cal-nav {
    background: #d4af37;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s;
}

.abp-cal-nav:hover {
    background: #b8941f;
}

#abp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.abp-cal-day {
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 18px;
    background: #fff;
}

.abp-cal-day:hover:not(.disabled) {
    border-color: #d4af37;
    background: #fff9e6;
    transform: scale(1.05);
}

.abp-cal-day.selected {
    background: #d4af37;
    color: #fff;
    border-color: #d4af37;
}

.abp-cal-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Time Slots */
.abp-timeslots-wrapper {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.abp-timeslots-wrapper h3 {
    color: #333;
    margin-bottom: 20px;
}

#abp-timeslots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.abp-timeslot {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    background: #fff;
}

.abp-timeslot:hover:not(.booked) {
    border-color: #d4af37;
    background: #fff9e6;
    transform: translateY(-2px);
}

.abp-timeslot.selected {
    background: #d4af37;
    color: #fff;
    border-color: #d4af37;
}

.abp-timeslot.booked {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8d7da;
    text-decoration: line-through;
}

/* Form */
.abp-form-group {
    margin-bottom: 20px;
}

.abp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.abp-form-group input,
.abp-form-group textarea,
.abp-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.abp-form-group input:focus,
.abp-form-group textarea:focus,
.abp-form-group select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.abp-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

/* Booking Summary */
.abp-booking-summary {
    background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
    border: 2px solid #d4af37;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.abp-booking-summary h3 {
    margin-top: 0;
    color: #d4af37;
    font-size: 22px;
}

.abp-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
}

.abp-summary-row.abp-total-row {
    font-size: 22px;
    font-weight: bold;
    color: #d4af37;
    margin-top: 10px;
    border-bottom: none;
}

.abp-summary-row.abp-deposit-row {
    color: #28a745;
    font-weight: 600;
}

/* Payment Methods */
.abp-payment-methods {
    margin: 25px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.abp-payment-methods h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.abp-payment-option {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.abp-payment-option:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212,175,55,0.2);
}

.abp-payment-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.payment-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
}

.payment-gateway-section {
    margin-top: 15px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    display: none;
}

.payment-gateway-section.active {
    display: block;
}

.stripe-card-element {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    min-height: 45px;
}

.stripe-card-errors {
    color: #dc3545;
    margin-top: 10px;
    font-size: 14px;
    min-height: 20px;
}

.payment-security-note {
    margin-top: 12px;
    padding: 10px;
    background: #e7f3ff;
    border-radius: 4px;
    font-size: 13px;
    color: #0066cc;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Loading State */
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

/* Success Message */
.abp-success-message {
    text-align: center;
    padding: 60px 20px;
}

.abp-success-icon {
    width: 100px;
    height: 100px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    margin: 0 auto 30px;
    animation: successPulse 1s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.abp-success-message h2 {
    color: #28a745;
    margin: 20px 0;
    font-size: 28px;
}

.success-text {
    font-size: 16px;
    color: #666;
    margin: 20px 0;
}

.success-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.success-details ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.success-details li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
}

.success-details li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .abp-booking-wrapper {
        padding: 10px;
    }
    
    .abp-booking-step {
        padding: 20px;
    }
    
    #abp-timeslots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #abp-calendar-grid {
        gap: 5px;
    }
    
    .abp-cal-day {
        font-size: 14px;
    }
    
    .abp-booking-summary {
        padding: 15px;
    }
}