/**
 * Frontend CSS for Longy Accommodations
 * Path: assets/css/frontend.css
 */

/* Reset and Base Styles */
.longy-form *,
.longy-accommodations-list * {
    box-sizing: border-box;
}
.action_buttons_longy {
    display: flex;
    justify-content: end;
    width: 100%;
}
.payment-option-content {
    display: flex;
    gap: 10px;
}
label.payment-option {
    display: flex;
    gap: 21px;
}
/* Booking Form Container */
#longy-booking-form-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Main Form Styles */
.longy-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin: 20px 0;
    border: 1px solid #e1e5e9;
}

/* Progress Indicator */
.booking-progress {
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.progress-bar-container {
    background: #f0f0f0;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    width: 33%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Step Management */
.booking-step {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.booking-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.booking-step h3 {
    color: #2c3e50;
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    transition: color 0.2s ease;
}

.form-group.focused label {
    color: #667eea;
}

.required-asterisk {
    color: #e74c3c;
    margin-left: 3px;
}

/* Form Controls */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #ffffff;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.invalid {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

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

/* Character Counter */
.char-counter {
    font-size: 12px;
    color: #999;
    text-align: right;
    margin-top: 5px;
}

.char-counter.warning {
    color: #e74c3c;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #ffffff;
    color: #667eea;
    border-color: #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
    width: 100%;
    margin-right: 0;
    border-radius: 10px;
}

.btn-large small {
    display: block;
    font-size: 13px;
    margin-top: 4px;
    opacity: 0.9;
    font-weight: 400;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Availability Results */
.availability-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #28a745;
    font-weight: 500;
}

.availability-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #dc3545;
    font-weight: 500;
}

/* Extra Services */
#extra-services-container {
    margin: 25px 0;
}

.extra-service {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    margin-bottom: 15px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.extra-service:hover {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.extra-service-info h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.extra-service-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.extra-service-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Quantity Controls */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 4px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #667eea;
    color: white;
}

.quantity-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    padding: 8px 4px;
    font-size: 14px;
    font-weight: 600;
}

/* Booking Summary */
.booking-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    border: 1px solid #dee2e6;
}

.booking-summary h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

#summary-details {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

#summary-details p {
    margin: 8px 0;
    font-size: 14px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 0;
    font-size: 14px;
}

.total-row:not(.final-total) {
    color: #666;
}

.final-total {
    border-top: 2px solid #2c3e50;
    padding-top: 15px;
    margin-top: 15px;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

/* Terms Section */
.terms-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    margin-top: 2px;
    accent-color: #667eea;
    flex-shrink: 0;
}

.checkbox-label:hover {
    color: #2c3e50;
}

/* Loading Overlay */
.booking-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
}

.booking-overlay.active {
    display: flex;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.booking-overlay p {
    font-size: 16px;
    margin: 0;
    text-align: center;
}

/* Success State */
.booking-success {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 12px;
    border: 2px solid #28a745;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    font-weight: bold;
}

.booking-success h2 {
    color: #155724;
    margin: 0 0 15px 0;
    font-size: 28px;
}

.booking-success p {
    color: #155724;
    margin: 10px 0;
    font-size: 16px;
}

.booking-details {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid rgba(21, 87, 36, 0.2);
}

/* Alerts */
.booking-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-message {
    flex: 1;
    font-weight: 500;
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* Accommodations List */
.longy-accommodations-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.accommodation-card {
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.accommodation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.accommodation-image {
    position: relative;
    overflow: hidden;
}

.accommodation-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.accommodation-card:hover .accommodation-image img {
    transform: scale(1.05);
}

.accommodation-content {
    padding: 25px;
}

.accommodation-content h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 22px;
    font-weight: 600;
}

.accommodation-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 15px;
}

.accommodation-details {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.accommodation-details > div {
    margin-bottom: 8px;
}

.accommodation-details > div:last-child {
    margin-bottom: 0;
}

.price {
    font-size: 20px;
    color: #667eea;
    font-weight: 700;
}

.capacity,
.nights-range {
    color: #666;
    font-size: 14px;
}

.book-now-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.book-now-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .longy-form {
        padding: 25px 20px;
        margin: 10px;
        border-radius: 8px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .booking-step h3 {
        font-size: 20px;
    }
    
    .extra-service {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .extra-service-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .longy-accommodations-list {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }
    
    .accommodation-card {
        margin: 0 10px;
    }
    
    .booking-alert {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .longy-form {
        padding: 20px 15px;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .booking-summary {
        padding: 20px;
    }
    
    .accommodation-content {
        padding: 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
	.payment-option-content {
    display: flex;
    gap: 10px;
    font-size: 12px;
}
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border-color: #000;
    }
    
    .btn-secondary {
        border-color: #000;
        color: #000;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #000;
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3);
    }
}

/* Print Styles */
@media print {
    .booking-overlay,
    .booking-alert,
    .btn,
    .extra-service-controls {
        display: none !important;
    }
    
    .longy-form {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .booking-step {
        display: block !important;
    }
}