/**
 * Frontend Styles for Ticket Booking System
 * Updated version with new dropdown calendar styles
 */

/* === SCOPED FOR TICKET BOOKING ONLY === */
.ticket-booking-wrapper .form-row {
    text-align: right;
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 20px;
}
.ticket-booking-wrapper .form-group {
    flex: 1;
    min-width: 250px;
    padding: 0 10px;
    margin-bottom: 15px;
}
.ticket-booking-wrapper .form-group.full-width {
    flex: 0 0 100%;
}
.ticket-booking-wrapper .form-group label {
    text-align: right;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}
.ticket-booking-wrapper .form-group input,
.ticket-booking-wrapper .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.ticket-booking-wrapper .form-group input:focus,
.ticket-booking-wrapper .form-group select:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.25);
    outline: none;
}
.ticket-booking-wrapper .form-group input.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}
.ticket-booking-wrapper .form-row label {
  text-align: right;
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.ticket-booking-wrapper .form-row input,
.ticket-booking-wrapper .form-row select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.ticket-booking-wrapper .form-row input.error {
  border-color: #f44336;
}
/* === END SCOPED FOR TICKET BOOKING ONLY === */

/* National ID Upload */
#national_id_upload_field {
  border: 1px solid #eee;
  padding: 15px;
  margin-bottom: 20px;
  background-color: #f8f8f8;
  border-radius: 4px;
}

#national_id_card_field .description {
  display: block;
  font-size: 12px;
  color: #777;
  margin-top: 5px;
}













/* Validation styles */
.form-field input.error,
.form-field select.error,
.form-field textarea.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

.form-field input.valid,
.form-field select.valid,
.form-field textarea.valid {
    border-color: #27ae60 !important;
    box-shadow: 0 0 5px rgba(39, 174, 96, 0.3);
}


/* Loading state */
.single_add_to_cart_button.loading {
    opacity: 0.6;
    cursor: not-allowed;
}




















/* Bus Seat Selection */
.bus-container,
.bus-header,
.mercedes-logo,
.bus-seats-container,
.seat-row,
.seat,
.seat-space,
.seat.available,
.seat.booked,
.seat.unavailable,
.seat.selected,
.seat-legend,
.legend-item,
.legend-color,
.legend-color.selected,
.legend-color.available,
.legend-color.booked,
.legend-color.unavailable,
.selected-seats-container,
.selected-seats-container h4,
.selected-seats-icon,
.selected-seats-list,
.selected-seat-item,
.remove-seat,
.continue-purchase-button,
.continue-purchase-button:hover,
.continue-purchase-button:disabled {
    display: none !important;
}

/* ==================== تقویم دراپ‌داون جدید ==================== */

/* کانتینر اصلی تقویم دراپ‌داون */
.simple-dropdown-calendar-container {
  margin-bottom: 25px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  border: 1px solid #e1e8ed;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
  direction: rtl;
}

.simple-dropdown-calendar-container h4 {
  margin-top: 0;
  margin-bottom: 20px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ردیف دراپ‌داون‌ها */
.dropdown-calendar-row {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* لیبل‌های تقویم */
.dropdown-calendar-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: white;
  font-size: 14px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* گروه هر دراپ‌داون */
.dropdown-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

/* استایل دراپ‌داون‌ها */
.dropdown-calendar-select {
  padding: 12px 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 90px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.dropdown-calendar-select:focus {
  border-color: rgba(255, 255, 255, 0.8);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  background-color: white;
}

.dropdown-calendar-select:hover {
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* نمایش تاریخ انتخاب شده */
.selected-date-display {
  margin-top: 15px;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  text-align: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

.selected-date-display.empty {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  font-size: 14px;
}

/* انیمیشن ظاهر شدن */
.simple-dropdown-calendar-container {
  animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* پشتیبانی از موبایل */
@media (max-width: 768px) {
  .dropdown-calendar-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .dropdown-group {
    width: 100%;
    max-width: 200px;
  }
  
  .dropdown-calendar-select {
    width: 100%;
    min-width: auto;
  }
  
  .simple-dropdown-calendar-container {
    padding: 15px;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .simple-dropdown-calendar-container h4 {
    font-size: 16px;
  }
  
  .dropdown-calendar-select {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .selected-date-display {
    font-size: 14px;
    padding: 10px;
  }
}

/* تنظیمات خاص برای فرم‌های مختلف */
.woocommerce .simple-dropdown-calendar-container {
  margin: 20px 0;
}

/* استایل برای حالت خطا */
.dropdown-calendar-select.error {
  border-color: #ff6b6b !important;
  background-color: #ffe6e6 !important;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* پیام خطا */
.calendar-error-message {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 5px;
  text-align: center;
  background-color: rgba(255, 107, 107, 0.1);
  padding: 5px;
  border-radius: 5px;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

/* ================ پایان استایل‌های تقویم دراپ‌داون ================ */

/* فیلد تاریخ فارسی برای سازگاری با کدهای قبلی */
.persian-date-picker-container {
  margin-bottom: 25px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  border: 1px solid #e1e8ed;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.persian-date-picker-container h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.persian-date-picker-container .form-row {
  margin-bottom: 10px;
}

.persian-date-picker-container label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: white;
  font-size: 14px;
  text-align: center;
}

.persian-date-picker-container input[type="text"] {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.persian-date-picker-container input[type="text"]:focus {
  border-color: rgba(255, 255, 255, 0.8);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  background-color: white;
}

.persian-date-picker-container input[type="text"]:hover {
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

/* آیکون تقویم */
.persian-date-picker-container input.persian-date-picker {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23666" viewBox="0 0 16 16"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/></svg>');
  background-repeat: no-repeat;
  background-position: left 15px center;
  padding-left: 45px;
}

/* پشتیبانی RTL */
[dir="rtl"] .persian-date-picker-container input.persian-date-picker {
  background-position: right 15px center;
  padding-right: 45px;
  padding-left: 15px;
}












/* Session Time Selection Styles */
.session-times-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}


.session-time-item {
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.session-time-item.selected {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: white;
    border-color: #2ecc71;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.session-time-item.disabled {
    background: #eee !important;
    color: #aaa !important;
    cursor: not-allowed !important;
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.sold-out-label {
    display: block;
    color: #e74c3c;
    font-weight: bold;
    margin-top: 8px;
    font-size: 15px;
}

.time-label {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.capacity-label {
    font-size: 14px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.session-time-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.5) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.session-time-item:hover::before {
    opacity: 1;
}

.passenger-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #4facfe 0%, #00f2fe 100%);
}

.passenger-form-title {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
    color: #343a40;
    font-size: 20px;
    position: relative;
}

.passenger-form-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
}

/* File Upload Styling */
.file-upload-container {
    position: relative;
    margin-top: 20px;
    padding: 20px;
    border: 2px dashed #4facfe;
    border-radius: 8px;
    background-color: rgba(79, 172, 254, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.file-upload-container:hover {
    background-color: rgba(79, 172, 254, 0.1);
}

.file-upload-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.file-upload-text {
    display: block;
    color: #6c757d;
    font-size: 14px;
}

.file-upload-preview {
    margin-top: 15px;
    display: none;
}

.file-upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.file-name-display {
    margin-top: 10px;
    font-weight: 600;
    color: #495057;
}

/* Terms and Conditions */
.terms-container {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.terms-checkbox input {
    width: auto !important;
}

#show-terms-btn {
    margin-left: 10px;
    color: #4facfe;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s;
}

#show-terms-btn:hover {
    color: #0056b3;
}

/* Modal Styles */
.terms-modal {
    text-align: right;
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.terms-modal-content {
    background-color: #fff;
    margin: 5% auto;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.4s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-30px);}
    to {opacity: 1; transform: translateY(0);}
}

.terms-modal-header {
    text-align: right;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terms-modal-header h3 {
    text-align: right;
    margin: 0;
    font-size: 22px;
}

.terms-modal-close {
    text-align: right;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.terms-modal-close:hover {
    transform: rotate(90deg);
}

.terms-modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.terms-modal-body h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #343a40;
    font-size: 18px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.terms-modal-body ul {
    text-align: right;
    margin-bottom: 20px;
    padding-left: 20px;
}

.terms-modal-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.terms-modal-footer {
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: left;
}

.btn {
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(to right, #0062cc 0%, #0093ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Quantity Container */
#quantity-container {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border-radius: 8px;
    display: flex;
    align-items: center;
}

#quantity-container label {
    margin-right: 15px;
    font-weight: 600;
    color: #495057;
}

#quantity {
    width: 80px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

/* Reservation Info */
#reservation-info-container {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.reservation-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.capacity-info {
    font-weight: 600;
    color: #343a40;
}

/* Loading Spinner */
.loading-spinner {
    padding: 20px;
    text-align: center;
    color: #4facfe;
    font-weight: 600;
}

.loading-spinner::after {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    margin: 10px auto 0;
    border-radius: 50%;
    border: 3px solid #4facfe;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Required Field Indicator */
.required {
    color: #dc3545;
    margin-left: 3px;
}


/* Session Date Container */
.session-date-container {
    text-align: right;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.session-date-container label {
    text-align: right;
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
}

.session-date-container select {
    text-align: right;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.session-date-container select:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.25);
    outline: none;
}

/* Session Selection Wrapper */
.session-selection-wrapper {
    text-align: right;
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
}

.session-selection-wrapper h3 {
    text-align: right;
    margin-top: 0;
    margin-bottom: 20px;
    color: #343a40;
    font-size: 22px;
    position: relative;
    padding-bottom: 10px;
}

.session-selection-wrapper h3::after {
    text-align: right;
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
}

/* Birth Date Picker Styles */
.birth-date-picker {
    position: relative;
}

.birth-date-picker input {
    padding-right: 40px;
    cursor: pointer;
}

.birth-date-picker::after {
    content: '\f133';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}




/* Calendar Dropdown Styles */
.simple-dropdown-calendar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    padding: 15px;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.simple-dropdown-calendar .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.simple-dropdown-calendar .calendar-header select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
}

.simple-dropdown-calendar .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.simple-dropdown-calendar .calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 8px 0;
    color: #495057;
}

.simple-dropdown-calendar .calendar-day {
    text-align: center;
    padding: 10px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.simple-dropdown-calendar .calendar-day:hover {
    background-color: #e9ecef;
}

.simple-dropdown-calendar .calendar-day.selected {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-weight: bold;
}

.simple-dropdown-calendar .calendar-day.disabled {
    color: #adb5bd;
    cursor: not-allowed;
    background: none;
}



/* National ID Card Upload Styles */
.national-id-upload {
    margin-top: 20px;
}

.national-id-upload-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
}

.national-id-upload-container {
    position: relative;
    padding: 25px;
    border: 2px dashed #4facfe;
    border-radius: 8px;
    background-color: rgba(79, 172, 254, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.national-id-upload-container:hover {
    background-color: rgba(79, 172, 254, 0.1);
}

.national-id-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.national-id-upload-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.national-id-upload-text {
    display: block;
    color: #6c757d;
    font-size: 14px;
    margin-top: 10px;
}

.national-id-preview {
    margin-top: 15px;
    display: none;
}

.national-id-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.national-id-filename {
    margin-top: 10px;
    font-weight: 600;
    color: #495057;
}

