/* Tropida Booking Plugin - Frontend Styles */

/* Reset and Base Styles */
.tropida-booking-form * {
    box-sizing: border-box;
}

.tropida-booking-form {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Main Container */
.tropida-booking-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Background Image Container */
.tropida-booking-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image: var(--tropida-bg-image, url('../images/destinations/rhodes-background.jpg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.tropida-booking-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
}

/* Ensure body and html don't have overflow issues */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

html {
    margin: 0;
    padding: 0;
}

/* Step Progress Indicator */
.tropida-booking-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 20px;
    position: relative;
}

.tropida-booking-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: #f8f9fa;
    padding: 0 10px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #007bff;
    color: white;
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-title {
    font-size: 12px;
    text-align: center;
    color: #6c757d;
    font-weight: 500;
}

.step.active .step-title {
    color: #007bff;
    font-weight: 600;
}

.step.completed .step-title {
    color: #28a745;
}

/* Step Content */
.tropida-step-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tropida-step-content .step-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    text-align: center;
}

.step-description {
    text-align: center;
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Destination Grid */
.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.destination-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.destination-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.destination-card.selected {
    border: 3px solid #007bff;
    transform: translateY(-5px);
}

.destination-image {
    width: 100%;
    transition: transform 0.3s ease;
}

.destination-image img {
    width: 100%;
    height: auto;
    display: block;
}

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

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

.destination-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    padding: 20px;
    text-align: center;
}

.destination-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    padding: 20px;
    text-align: center;
}

.destination-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.destination-price {
    font-size: 16px;
    font-weight: 700;
    color: #b0b0b0;
    margin: 0;
}

/* Navigation Buttons */
.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.tropida-next-btn {
    background: #007bff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tropida-next-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.tropida-next-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Form Content */
.tropida-form-content {
    padding: 40px;
}

/* Form Groups */
.tropida-form-group {
    margin-bottom: 25px;
}

.tropida-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.tropida-form-col {
    flex: 1;
}

.tropida-form-col-2 {
    flex: 2;
}

/* Labels */
.tropida-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.tropida-form-label.required::after {
    content: ' *';
    color: #dc3545;
}

/* Input Fields */
.tropida-form-input,
.tropida-form-select,
.tropida-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

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

.tropida-form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload */
.tropida-file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.tropida-file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.tropida-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tropida-file-label:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.tropida-file-label.has-file {
    border-color: #28a745;
    background: #f0fff4;
    color: #28a745;
}

.tropida-file-icon {
    font-size: 24px;
    margin-right: 10px;
}

.tropida-file-text {
    font-weight: 500;
}

.tropida-file-info {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Payment Methods */
.tropida-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.tropida-payment-method {
    position: relative;
}

.tropida-payment-radio {
    position: absolute;
    opacity: 0;
}

.tropida-payment-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    font-weight: 500;
}

.tropida-payment-label:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.tropida-payment-radio:checked + .tropida-payment-label {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.tropida-payment-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

/* Price Summary */
.tropida-price-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.tropida-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tropida-price-row:last-child {
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 18px;
}

.tropida-price-label {
    color: #495057;
}

.tropida-price-value {
    font-weight: 600;
    color: #333;
}

/* Booking Summary */
.tropida-booking-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.tropida-booking-summary h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 20px;
}

.tropida-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.tropida-summary-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.tropida-summary-label {
    color: #6c757d;
    font-weight: 500;
}

.tropida-summary-value {
    font-weight: 600;
    color: #333;
}

/* Passenger Forms */
.tropida-passenger-form {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    background: #fff;
}

.tropida-passenger-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.tropida-passenger-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
}

.tropida-passenger-title {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

/* Buttons */
.tropida-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.tropida-btn-primary {
    background: #667eea;
    color: white;
}

.tropida-btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tropida-btn-secondary {
    background: #6c757d;
    color: white;
}

.tropida-btn-secondary:hover {
    background: #5a6268;
}

.tropida-btn-success {
    background: #28a745;
    color: white;
}

.tropida-btn-success:hover {
    background: #218838;
}

.tropida-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.tropida-btn-loading {
    position: relative;
    color: transparent;
}

.tropida-btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: tropida-spin 1s linear infinite;
}

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

/* Form Actions */
.tropida-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.tropida-form-actions .tropida-btn {
    margin: 0 5px;
}

/* Messages */
.tropida-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.tropida-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

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

.tropida-message-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.tropida-message-info {
    background: #cce7ff;
    border: 1px solid #b3d9ff;
    color: #004085;
}

/* Loading Overlay */
.tropida-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tropida-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: tropida-spin 1s linear infinite;
}

/* Confirmation Screen */
.tropida-confirmation {
    text-align: center;
    padding: 40px;
}

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

.tropida-confirmation h2 {
    color: #28a745;
    margin: 0 0 15px 0;
    font-size: 28px;
}

.tropida-confirmation p {
    color: #6c757d;
    font-size: 16px;
    margin: 0 0 30px 0;
}

/* Menu Preference */
.menu-options {
    display: flex;
    gap: 20px;
}

.menu-option {
    flex: 1;
}

.menu-option input[type="radio"] {
    display: none;
}

.menu-label {
    display: block;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.menu-option input[type="radio"]:checked + .menu-label {
    border-color: #28a745;
    background: #28a745;
    color: white;
}

/* Citizen Options */
.citizen-options {
    display: flex;
    gap: 20px;
}

.citizen-option {
    flex: 1;
}

.citizen-option input[type="radio"] {
    display: none;
}

.citizen-label {
    display: block;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.citizen-option input[type="radio"]:checked + .citizen-label {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.payment-option {
    display: block;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-label {
    display: block;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.payment-label img {
    max-width: 60px;
    max-height: 30px;
    margin-bottom: 8px;
}

.payment-label small {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
}

.payment-option input[type="radio"]:checked + .payment-label {
    border-color: #007bff;
    background: #f8f9ff;
}

/* Payment Summary */
.payment-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.price-breakdown {
    max-width: 400px;
    margin: 0 auto;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.price-row.deposit {
    font-weight: 600;
    font-size: 18px;
    color: #007bff;
    border-bottom: none;
}

/* File Upload */
.form-group input[type="file"] {
    padding: 10px;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.file-info {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tropida-form-content {
        padding: 20px;
    }
    

    
    .tropida-payment-methods {
        grid-template-columns: 1fr;
    }
    
    .tropida-form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .tropida-form-actions .tropida-btn {
        width: 100%;
        margin: 0;
    }
    
    .citizen-options,
    .menu-options {
        flex-direction: column;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .tropida-progress {
        padding: 15px;
    }
    
    .tropida-progress-arrow {
        margin: 0 10px;
        font-size: 14px;
    }
    
    .tropida-progress-step {
        font-size: 14px;
    }
    
    .tropida-form-header h2 {
        font-size: 24px;
    }
    
    .tropida-form-header p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tropida-booking-form {
        margin: 10px;
    }
    
    .tropida-form-content {
        padding: 15px;
    }
    
    .tropida-form-header {
        padding: 20px;
    }
    
    .tropida-passenger-form {
        padding: 15px;
    }
    
    .tropida-booking-summary {
        padding: 15px;
    }
    
    .tropida-price-summary {
        padding: 15px;
    }
}

/* RTL Support */
.rtl .tropida-booking-form {
    direction: rtl;
    text-align: right;
}

.rtl .tropida-progress-arrow {
    transform: scaleX(-1);
}

.rtl .tropida-payment-icon,
.rtl .tropida-file-icon {
    margin-right: 0;
    margin-left: 10px;
}

.rtl .tropida-passenger-number {
    margin-right: 0;
    margin-left: 15px;
}

/* Print Styles */
@media print {
    .tropida-form-actions,
    .tropida-btn {
        display: none;
    }
    
    .tropida-form-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .tropida-form-input,
    .tropida-form-select,
    .tropida-form-textarea {
        border-width: 3px;
    }
    
    .tropida-btn {
        border: 2px solid currentColor;
    }
}

/* Destination Grid */
.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.destination-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 200px;
}

.destination-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.destination-card.selected {
    border: 3px solid #007bff;
    transform: translateY(-5px);
}

.destination-image {
    width: 100%;
    height: 100%;
}

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

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

.destination-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px;
    text-align: center;
}

.destination-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.destination-price {
    font-size: 16px;
    font-weight: 700;
    color: #007bff;
    margin: 0;
}

/* Form Styles */
.form-section {
    margin-bottom: 30px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .tropida-booking-form *,
    .tropida-booking-form *::before,
    .tropida-booking-form *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}