/* ============================================
   CHECKOUT PAGE STYLES
   Touch Beauty Salon
   ============================================ */

/* Main Wrapper */
.checkout-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

/* Checkout Header */
.checkout-header {
    text-align: center;
    margin-bottom: 50px;
}

.checkout-header h1 {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color, #b5824e) 0%, var(--primary-light, #d4a574) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.checkout-header p {
    color: var(--light-text, #777);
    font-size: 16px;
}

/* Booking Steps */
.booking-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #b5824e) 0%, var(--primary-light, #d4a574) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 5px 15px rgba(181, 130, 78, 0.3);
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--primary-color, #b5824e) 0%, var(--primary-light, #d4a574) 100%);
}

.step.completed .step-number {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
}

.step-text {
    font-weight: 600;
    color: var(--dark-text, #333);
}

.step-text small {
    font-size: 12px;
    color: var(--light-text, #777);
    font-weight: 400;
}

/* Checkout Grid - Two Columns */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
}

/* Form Card & Summary Card */
.form-card,
.summary-card {
    background: var(--white-color, #fff);
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(181, 130, 78, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-card:hover,
.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(181, 130, 78, 0.12);
}

/* Card Header */
.card-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, var(--light-bg, #f9f7f4) 0%, #fff 100%);
    border-bottom: 2px solid rgba(181, 130, 78, 0.2);
}

.card-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-text, #333);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header h3 i {
    color: var(--primary-color, #b5824e);
    font-size: 24px;
}

/* Card Body */
.card-body {
    padding: 30px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-text, #333);
    font-size: 14px;
}

.form-group label i {
    color: var(--primary-color, #b5824e);
    margin-right: 8px;
    width: 18px;
}

.required {
    color: #dc3545;
    margin-left: 4px;
}

/* Form Controls */
.form-control,
.form-select {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e8e0d8;
    border-radius: 16px;
    font-family: var(--font-family, 'QatarArabic', 'Tajawal', sans-serif);
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--white-color, #fff);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color, #b5824e);
    box-shadow: 0 0 0 4px rgba(181, 130, 78, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Time Slots */
.time-slots {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.time-slot-btn {
    flex: 1;
    min-width: 100px;
    padding: 14px 20px;
    border: 2px solid #e8e0d8;
    border-radius: 50px;
    background: var(--white-color, #fff);
    font-family: var(--font-family, 'QatarArabic', 'Tajawal', sans-serif);
    font-weight: 600;
    color: var(--dark-text, #333);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.time-slot-btn:hover {
    border-color: var(--primary-color, #b5824e);
    background: rgba(181, 130, 78, 0.05);
}

.time-slot-btn.selected {
    background: linear-gradient(135deg, var(--primary-color, #b5824e) 0%, var(--primary-light, #d4a574) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 5px 15px rgba(181, 130, 78, 0.3);
}

.time-slot-btn input {
    display: none;
}

/* Summary Items Container */
.summary-items {
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 25px;
    padding-right: 10px;
}

/* Custom Scrollbar */
.summary-items::-webkit-scrollbar {
    width: 5px;
}

.summary-items::-webkit-scrollbar-track {
    background: var(--light-bg, #f9f7f4);
    border-radius: 10px;
}

.summary-items::-webkit-scrollbar-thumb {
    background: var(--primary-color, #b5824e);
    border-radius: 10px;
}

/* Summary Item */
.summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0ebe5;
    transition: all 0.3s ease;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item:hover {
    background: rgba(181, 130, 78, 0.03);
    padding-left: 10px;
    margin-left: -10px;
    border-radius: 12px;
}

/* Service Image */
.item-image {
    flex-shrink: 0;
    width: 65px;
    height: 65px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--light-bg, #f9f7f4) 0%, #fff 100%);
    border: 1px solid rgba(181, 130, 78, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.service-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.summary-item:hover .service-thumb {
    transform: scale(1.08);
}

/* No Image Placeholder */
.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0ebe5 0%, #e8e0d8 100%);
    color: var(--primary-color, #b5824e);
    font-size: 24px;
}

/* Item Info */
.item-info {
    flex: 1;
    min-width: 0;
}

.item-info h5 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-text, #333);
    line-height: 1.3;
    word-break: break-word;
}

/* Pricing Label (Sub-Service) */
.pricing-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 6px 0;
    padding: 3px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-color, #b5824e);
    background: rgba(181, 130, 78, 0.1);
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.pricing-label i {
    font-size: 10px;
}

/* Quantity */
.item-info .qty {
    font-weight: bold;
    margin: 0;
    font-size: 13px;
    color: var(--light-text, #777);
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-info p i {
    font-size: 11px;
    color: var(--primary-color, #b5824e);
    opacity: 0.7;
}

/* Item Price */
.item-price {
    font-weight: 800;
    color: var(--primary-color, #b5824e);
    font-size: 17px;
    flex-shrink: 0;
    white-space: nowrap;
    font-family: var(--font-family, 'QatarArabic', 'Tajawal', sans-serif);
}

/* Summary Totals */
.summary-totals {
    background: linear-gradient(135deg, var(--light-bg, #f9f7f4) 0%, #fff 100%);
    padding: 20px 25px;
    border-radius: 20px;
    margin-top: 20px;
    border: 1px solid rgba(181, 130, 78, 0.1);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    padding: 5px 0;
}

.total-row:last-child {
    margin-bottom: 0;
}

.total-row span:first-child {
    color: var(--light-text, #777);
    font-weight: 500;
}

.total-row span:last-child {
    font-weight: 600;
    color: var(--dark-text, #333);
}

.total-row.grand-total {
    font-size: 20px;
    font-weight: 800;
    border-top: 2px dashed rgba(181, 130, 78, 0.25);
    padding-top: 15px;
    margin-top: 10px;
}

.total-row.grand-total span:first-child {
    color: var(--dark-text, #333);
    font-weight: 700;
}

.total-row.grand-total span:last-child {
    color: var(--primary-color, #b5824e);
    font-size: 22px;
    font-weight: 800;
}

/* Security Note */
.security-note {
    margin-top: 20px;
    padding: 15px 20px;
    background: rgba(181, 130, 78, 0.06);
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(181, 130, 78, 0.1);
}

.security-note p {
    margin: 0;
    font-size: 12px;
    color: var(--light-text, #777);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.security-note i {
    color: var(--primary-color, #b5824e);
    font-size: 14px;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color, #b5824e) 0%, var(--primary-light, #d4a574) 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    font-size: 18px;
    font-family: var(--font-family, 'QatarArabic', 'Tajawal', sans-serif);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(181, 130, 78, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Empty Cart Message */
.empty-cart-message {
    text-align: center;
    padding: 60px 40px;
    background: var(--white-color, #fff);
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    margin: 0 auto;
}

.empty-cart-message .icon {
    font-size: 80px;
    background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.empty-cart-message h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-text, #333);
    margin-bottom: 15px;
}

.empty-cart-message p {
    color: var(--light-text, #777);
    margin-bottom: 25px;
}

.btn-continue {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-color, #b5824e) 0%, var(--primary-light, #d4a574) 100%);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(181, 130, 78, 0.3);
    color: white;
}

/* Confirmation Screen */
.confirmation-screen {
    text-align: center;
    padding: 60px 40px;
    background: var(--white-color, #fff);
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    max-width: 700px;
    margin: 0 auto;
}

.confirmation-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
}

.confirmation-icon i {
    font-size: 50px;
    color: white;
}

.confirmation-screen h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-text, #333);
    margin-bottom: 15px;
}

.confirmation-screen p {
    color: var(--light-text, #777);
    margin-bottom: 20px;
    font-size: 16px;
}

.booking-ref {
    background: var(--light-bg, #f9f7f4);
    padding: 15px;
    border-radius: 16px;
    margin: 25px 0;
}

.booking-ref p {
    margin: 8px 0;
}

.booking-ref strong {
    color: var(--primary-color, #b5824e);
    font-size: 18px;
}

.btn-done {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--primary-color, #b5824e) 0%, var(--primary-light, #d4a574) 100%);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-done:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(181, 130, 78, 0.3);
    color: white;
}

/* Alert Danger */
.alert-danger {
    background: #f8d7da;
    border: none;
    border-radius: 16px;
    padding: 15px 20px;
    color: #721c24;
    margin-bottom: 25px;
    border-left: 4px solid #dc3545;
}

/* RTL Support */
html[dir="rtl"] .form-group label i {
    margin-right: 0;
    margin-left: 8px;
}

html[dir="rtl"] .summary-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .pricing-label i {
    margin-right: 0;
    margin-left: 4px;
}

html[dir="rtl"] .alert-danger {
    border-left: none;
    border-right: 4px solid #dc3545;
}

html[dir="rtl"] .summary-items {
    padding-right: 0;
    padding-left: 10px;
}

html[dir="rtl"] .summary-item:hover {
    padding-left: 0;
    padding-right: 10px;
    margin-left: 0;
    margin-right: -10px;
}

/* Flatpickr Customization */
.flatpickr-calendar {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    font-family: var(--font-family, 'QatarArabic', 'Tajawal', sans-serif);
}

.flatpickr-day.selected {
    background: var(--primary-color, #b5824e);
    border-color: var(--primary-color, #b5824e);
}

.flatpickr-day.today {
    border-color: var(--primary-color, #b5824e);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .checkout-wrapper {
        padding: 30px 20px;
    }
    
    .checkout-header h1 {
        font-size: 32px;
    }
    
    .booking-steps {
        gap: 20px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .card-header {
        padding: 20px 25px;
    }
    
    .card-header h3 {
        font-size: 18px;
    }
    
    .card-body {
        padding: 25px;
    }
    
    .summary-item {
        gap: 12px;
    }
    
    .item-image {
        width: 55px;
        height: 55px;
    }
    
    .item-info h5 {
        font-size: 15px;
    }
    
    .item-price {
        font-size: 15px;
    }
    
    .total-row.grand-total span:last-child {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .checkout-wrapper {
        padding: 20px 15px;
    }
    
    .checkout-header h1 {
        font-size: 28px;
    }
    
    .booking-steps {
        gap: 15px;
    }
    
    .step {
        gap: 8px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .step-text {
        font-size: 12px;
    }
    
    .step-text small {
        font-size: 10px;
    }
    
    .card-header {
        padding: 15px 20px;
    }
    
    .card-header h3 {
        font-size: 16px;
    }
    
    .card-header h3 i {
        font-size: 18px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control,
    .form-select {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .time-slots {
        gap: 0px;
        flex-direction: column;
    }
    
    .time-slot-btn {
        padding: 10px 15px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .summary-item {
        gap: 10px;
        padding: 12px 0;
    }
    
    .item-image {
        width: 45px;
        height: 45px;
        border-radius: 10px;
    }
    
    .no-image {
        font-size: 18px;
    }
    
    .item-info h5 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .pricing-label {
        font-size: 10px;
        padding: 2px 8px;
        margin-bottom: 4px;
    }
    
    .item-info p {
        font-size: 11px;
    }
    
    .item-price {
        font-size: 14px;
    }
    
    .summary-totals {
        padding: 15px 20px;
    }
    
    .total-row {
        font-size: 14px;
    }
    
    .total-row.grand-total {
        font-size: 18px;
    }
    
    .total-row.grand-total span:last-child {
        font-size: 18px;
    }
    
    .btn-submit {
        padding: 14px;
        font-size: 16px;
    }
    
    .confirmation-screen {
        padding: 40px 25px;
    }
    
    .confirmation-icon {
        width: 70px;
        height: 70px;
    }
    
    .confirmation-icon i {
        font-size: 35px;
    }
    
    .confirmation-screen h2 {
        font-size: 24px;
    }
    
    .confirmation-screen p {
        font-size: 14px;
    }
    
    .booking-ref strong {
        font-size: 16px;
    }
    
    .empty-cart-message {
        padding: 40px 25px;
    }
    
    .empty-cart-icon {
        font-size: 60px;
    }
    
    .empty-cart-message h3 {
        font-size: 20px;
    }
}