/* Tour Booking Form - Main Widget */
.tbf-booking-widget {
    background: white;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    margin: 20px 0;
    box-shadow: 0 2px 12px rgba(0, 139, 139, 0.08);
    max-width: 100%;
}

/* Header */
.tbf-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.tbf-header h3 {
    margin: 0;
    font-size: 18px;
    color: #008B8B;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Price Section */
.tbf-price-section {
    background: linear-gradient(135deg, #008B8B 0%, #00695C 100%);
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 14px;
    color: white;
}

.tbf-price-from {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tbf-from-label {
    font-size: 12px;
    opacity: 0.95;
    font-weight: 500;
}

.tbf-price-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.tbf-currency {
    font-size: 16px;
    color: #FFD700;
    font-weight: 600;
}

.tbf-price {
    font-size: 28px;
    font-weight: 800;
    color: #FFD700;
    line-height: 1;
}

.tbf-per-person {
    font-size: 12px;
    opacity: 0.9;
    margin-left: 4px;
}

/* Form Section */
.tbf-form-section {
    background: #f8f8f8;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
}

.tbf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tbf-col {
    display: flex;
    flex-direction: column;
}

.tbf-col label {
    font-size: 11px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.tbf-input {
    padding: 10px 12px;
    border: 2px solid #80CBC4;
    border-radius: 6px;
    font-size: 13px;
    color: #008B8B;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.2s;
}

.tbf-input:focus {
    outline: none;
    border-color: #008B8B;
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.tbf-travelers-btn {
    padding: 10px 12px;
    border: 2px solid #80CBC4;
    border-radius: 6px;
    background: white;
    color: #008B8B;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tbf-travelers-btn:hover {
    border-color: #008B8B;
    background: #f5f5f5;
    box-shadow: 0 2px 6px rgba(0, 139, 139, 0.1);
}

/* Total Section */
.tbf-total-section {
    background: linear-gradient(135deg, #008B8B 0%, #00695C 100%);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    color: white;
}

.tbf-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tbf-total-label {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 600;
}

.tbf-total-price {
    font-size: 26px;
    font-weight: 800;
    color: #FFD700;
}

/* Book Button */
.tbf-book-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #008B8B 0%, #00695C 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0, 139, 139, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.5px;
}

.tbf-book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0, 139, 139, 0.3);
}

.tbf-book-btn:active {
    transform: translateY(0);
}

/* Info Section */
.tbf-info-section {
    background: #E0F2F1;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #80CBC4;
}

.tbf-info-item {
    font-size: 12px;
    color: #00695C;
    margin-bottom: 5px;
    font-weight: 500;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tbf-info-item:last-child {
    margin-bottom: 0;
}

/* Modal */
.tbf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.tbf-modal.show {
    display: flex !important;
}

.tbf-modal-content {
    background: white;
    padding: 22px;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-height: 90vh;
    overflow-y: auto;
}

.tbf-close {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
}

.tbf-close:hover {
    color: #333;
}

.tbf-modal-content h3 {
    margin: 0 0 16px 0;
    color: #008B8B;
    font-size: 18px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Traveler Group */
.tbf-traveler-group {
    margin-bottom: 16px;
}

.tbf-traveler-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tbf-traveler-row:last-child {
    border-bottom: none;
}

.tbf-traveler-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tbf-traveler-name {
    font-size: 13px;
    color: #333;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tbf-traveler-age {
    font-size: 11px;
    color: #999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tbf-traveler-price {
    font-size: 12px;
    color: #008B8B;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Counter */
.tbf-counter {
    display: flex;
    gap: 6px;
    align-items: center;
}

.tbf-plus,
.tbf-minus {
    width: 28px;
    height: 28px;
    border: 2px solid #008B8B;
    background: white;
    color: #008B8B;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tbf-plus:hover,
.tbf-minus:hover {
    background: #008B8B;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 139, 139, 0.2);
}

.tbf-counter input {
    width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    font-weight: 700;
    color: #008B8B;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Modal Footer */
.tbf-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.tbf-modal-total {
    font-weight: 700;
    color: #008B8B;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tbf-apply-btn,
.tbf-confirm-btn {
    padding: 10px 18px;
    background: #008B8B;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tbf-apply-btn:hover,
.tbf-confirm-btn:hover {
    background: #00695C;
    box-shadow: 0 3px 10px rgba(0, 139, 139, 0.2);
}

/* Summary */
.tbf-summary {
    background: #f8f8f8;
    padding: 14px;
    border-radius: 8px;
    margin: 14px 0;
    border: 1px solid #e8e8e8;
}

.tbf-summary h4 {
    margin: 0 0 10px 0;
    color: #008B8B;
    font-size: 13px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tbf-summary p {
    margin: 6px 0;
    font-size: 12px;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Success Message */
.tbf-success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #4CAF50;
    color: white;
    padding: 18px 36px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    z-index: 10000;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tbf-booking-widget {
        padding: 14px;
        margin: 16px 0;
    }
    
    .tbf-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .tbf-price {
        font-size: 24px;
    }
    
    .tbf-total-price {
        font-size: 22px;
    }
    
    .tbf-modal-content {
        padding: 18px;
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .tbf-booking-widget {
        padding: 12px;
        margin: 12px 0;
        border-radius: 8px;
    }
    
    .tbf-header h3 {
        font-size: 16px;
    }
    
    .tbf-price-section {
        padding: 12px 14px;
        margin-bottom: 10px;
    }
    
    .tbf-price {
        font-size: 22px;
    }
    
    .tbf-form-section {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .tbf-row {
        gap: 8px;
    }
    
    .tbf-col label {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .tbf-input,
    .tbf-travelers-btn {
        font-size: 12px;
        padding: 9px 10px;
    }
    
    .tbf-total-section {
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    
    .tbf-total-price {
        font-size: 20px;
    }
    
    .tbf-book-btn {
        font-size: 13px;
        padding: 11px 14px;
        margin-bottom: 10px;
    }
    
    .tbf-info-item {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .tbf-modal-content {
        padding: 16px;
        border-radius: 10px;
    }
    
    .tbf-modal-content h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .tbf-traveler-row {
        padding: 10px 0;
    }
    
    .tbf-traveler-name {
        font-size: 12px;
    }
    
    .tbf-traveler-age {
        font-size: 10px;
    }
    
    .tbf-traveler-price {
        font-size: 11px;
    }
    
    .tbf-counter {
        gap: 4px;
    }
    
    .tbf-plus,
    .tbf-minus {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
    
    .tbf-counter input {
        width: 36px;
        font-size: 12px;
    }
    
    .tbf-modal-total {
        font-size: 12px;
    }
    
    .tbf-apply-btn,
    .tbf-confirm-btn {
        font-size: 12px;
        padding: 9px 16px;
    }
    
    .tbf-summary {
        padding: 12px;
        margin: 12px 0;
    }
    
    .tbf-summary h4 {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .tbf-summary p {
        font-size: 11px;
        margin: 4px 0;
    }
}

/* Flatpickr Calendar Styling */
.flatpickr-calendar {
    background: white;
    border: 2px solid #80CBC4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 139, 139, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.flatpickr-calendar.open {
    z-index: 9999;
}

.flatpickr-calendar .flatpickr-month {
    background: linear-gradient(135deg, #008B8B 0%, #00695C 100%);
    color: white;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.flatpickr-calendar .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-next-month {
    color: white;
    fill: white;
}

.flatpickr-calendar .flatpickr-weekdays {
    background: #E0F2F1;
}

.flatpickr-calendar .flatpickr-weekday {
    background: #E0F2F1;
    color: #008B8B;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.flatpickr-calendar .flatpickr-day {
    color: #333;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.flatpickr-calendar .flatpickr-day:hover {
    background: #B2DFDB;
    color: #008B8B;
    border-color: #80CBC4;
}

.flatpickr-calendar .flatpickr-day.selected {
    background: #008B8B;
    border-color: #008B8B;
    color: white;
    font-weight: 700;
}

.flatpickr-calendar .flatpickr-day.today {
    border-color: #008B8B;
    color: #008B8B;
    font-weight: 700;
}

.flatpickr-calendar * {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    direction: ltr !important;
}

#tbf-date {
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    direction: ltr !important;
}

#tbf-date::placeholder {
    color: #999;
}

[translate="no"],
[data-translate="no"] {
    direction: ltr !important;
}
