/**
 * NDC Traveler Bridge Frontend Styles
 */

/* Search Form Styles */
.ndc-flight-search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ndc-search-form {
    margin-bottom: 30px;
}

.ndc-search-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ndc-passengers-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ndc-field-group {
    flex: 1;
    min-width: 150px;
}

.ndc-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.ndc-field-group input,
.ndc-field-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.ndc-field-group input:focus,
.ndc-field-group select:focus {
    outline: none;
    border-color: #007cba;
}

.ndc-field-group input.error {
    border-color: #dc3232;
}

.error-message {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.ndc-search-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ndc-search-button:hover {
    background: #005a87;
}

.ndc-search-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Search Results Styles */
.ndc-search-results {
    margin-top: 30px;
}

.ndc-flight-offer {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.ndc-flight-offer:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ndc-offer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ndc-offer-price {
    font-size: 24px;
    font-weight: bold;
    color: #007cba;
}

.ndc-offer-currency {
    font-size: 16px;
    color: #666;
}

.ndc-flight-details {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.ndc-flight-segment {
    flex: 1;
    text-align: center;
}

.ndc-airport-code {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.ndc-airport-name {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.ndc-flight-time {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.ndc-flight-duration {
    font-size: 12px;
    color: #666;
}

.ndc-flight-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ndc-airline-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ndc-airline-code {
    font-weight: bold;
    color: #333;
}

.ndc-flight-number {
    color: #666;
}

.ndc-aircraft {
    font-size: 12px;
    color: #666;
}

.ndc-baggage-info {
    font-size: 12px;
    color: #666;
}

.ndc-offer-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.ndc-add-to-cart {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ndc-add-to-cart:hover {
    background: #218838;
}

.ndc-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ndc-view-details {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ndc-view-details:hover {
    background: #5a6268;
}

/* Loading and Error States */
.ndc-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.ndc-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

.ndc-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    max-width: 300px;
}

.ndc-message-success {
    background: #28a745;
}

.ndc-message-error {
    background: #dc3545;
}

/* Dashboard Styles */
.ndc-user-dashboard,
.ndc-admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ndc-dashboard-section {
    margin-bottom: 40px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ndc-dashboard-section h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

/* Bookings List Styles */
.ndc-bookings-list {
    margin-top: 20px;
}

.ndc-booking-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.ndc-booking-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ndc-booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ndc-booking-header h4 {
    margin: 0;
    color: #333;
}

.ndc-booking-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ndc-booking-status.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.ndc-booking-status.status-pending {
    background: #fff3cd;
    color: #856404;
}

.ndc-booking-status.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.ndc-booking-details {
    margin-bottom: 15px;
}

.ndc-booking-details p {
    margin: 5px 0;
    color: #666;
}

.ndc-booking-actions {
    display: flex;
    gap: 10px;
}

.ndc-booking-actions .button {
    padding: 8px 16px;
    font-size: 14px;
}

/* Statistics Styles */
.ndc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ndc-stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.ndc-stat-item h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

.ndc-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #007cba;
}

/* Booking Details Styles */
.ndc-booking-details-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ndc-booking-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.ndc-info-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

.ndc-info-item strong {
    color: #333;
}

/* Recent Searches Styles */
.ndc-recent-searches-list {
    margin-top: 15px;
}

.ndc-recent-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 4px solid #007cba;
}

.ndc-search-route {
    font-weight: 600;
    color: #333;
}

.ndc-search-date {
    color: #666;
    font-size: 14px;
}

.ndc-search-passengers {
    color: #666;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ndc-search-row,
    .ndc-passengers-row {
        flex-direction: column;
    }
    
    .ndc-field-group {
        min-width: auto;
    }
    
    .ndc-flight-details {
        flex-direction: column;
        gap: 10px;
    }
    
    .ndc-offer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ndc-flight-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ndc-offer-actions {
        flex-direction: column;
    }
    
    .ndc-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .ndc-booking-info-grid {
        grid-template-columns: 1fr;
    }
    
    .ndc-recent-search-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Integration with Traveler Theme */
.traveler-theme .ndc-flight-search-container {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.traveler-theme .ndc-dashboard-section {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* Traveler Theme Specific Styles */
.ndc-traveler-dashboard-sections {
    margin: 20px 0;
}

.ndc-traveler-dashboard-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ndc-traveler-dashboard-section h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.ndc-traveler-shortcode-title {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.ndc-traveler-widget-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.ndc-traveler-widget-content {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Traveler Flight Search Form */
.ndc-traveler-flight-search {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ndc-traveler-flight-search .ndc-search-form {
    margin-bottom: 0;
}

.ndc-traveler-flight-search .ndc-search-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ndc-traveler-flight-search .ndc-field-group {
    flex: 1;
    min-width: 150px;
}

.ndc-traveler-flight-search .ndc-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.ndc-traveler-flight-search .ndc-field-group input,
.ndc-traveler-flight-search .ndc-field-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.ndc-traveler-flight-search .ndc-field-group input:focus,
.ndc-traveler-flight-search .ndc-field-group select:focus {
    outline: none;
    border-color: #007cba;
}

.ndc-traveler-flight-search .ndc-search-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.ndc-traveler-flight-search .ndc-search-button:hover {
    background: #005a87;
}

/* Traveler Bookings List */
.ndc-traveler-bookings-list {
    margin-top: 20px;
}

.ndc-traveler-booking-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
}

.ndc-traveler-booking-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ndc-traveler-booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ndc-traveler-booking-header h5 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.ndc-traveler-booking-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ndc-traveler-booking-status.ndc-status-confirmed {
    background: #d4edda;
    color: #155724;
}

.ndc-traveler-booking-status.ndc-status-pending {
    background: #fff3cd;
    color: #856404;
}

.ndc-traveler-booking-status.ndc-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.ndc-traveler-booking-details {
    margin-bottom: 15px;
}

.ndc-traveler-booking-details p {
    margin: 5px 0;
    color: #666;
}

.ndc-traveler-booking-actions {
    display: flex;
    gap: 10px;
}

.ndc-traveler-booking-actions .button {
    padding: 8px 16px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

/* Traveler Booking Details */
.ndc-traveler-booking-details-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ndc-traveler-booking-details-content h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.ndc-traveler-booking-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.ndc-traveler-info-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

.ndc-traveler-info-item strong {
    color: #333;
}

/* Traveler Passengers List */
.ndc-traveler-passengers-list {
    margin-top: 20px;
}

.ndc-traveler-passenger-item {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #007cba;
}

.ndc-traveler-passenger-item h5 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

/* Traveler Statistics */
.ndc-traveler-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ndc-traveler-stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.ndc-traveler-stat-item h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

.ndc-traveler-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #007cba;
}

/* Traveler Recent Searches */
.ndc-traveler-recent-searches-list {
    margin-top: 15px;
}

.ndc-traveler-recent-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 4px solid #007cba;
}

.ndc-traveler-search-route {
    font-weight: 600;
    color: #333;
}

.ndc-traveler-search-date {
    color: #666;
    font-size: 14px;
}

.ndc-traveler-search-passengers {
    color: #666;
    font-size: 12px;
}

/* Traveler Compact Search */
.ndc-traveler-compact-search {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.ndc-traveler-compact-search .ndc-traveler-search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.ndc-traveler-compact-search .ndc-traveler-search-row:last-child {
    margin-bottom: 0;
}

.ndc-traveler-compact-search input,
.ndc-traveler-compact-search select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.ndc-traveler-compact-search .ndc-traveler-search-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.ndc-traveler-compact-search .ndc-traveler-search-button:hover {
    background: #005a87;
}

/* Traveler Error States */
.ndc-traveler-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

.ndc-traveler-login-required {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
    margin: 20px 0;
}

.ndc-traveler-no-bookings,
.ndc-traveler-no-searches {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 20px 0;
}

/* Traveler Dashboard Actions */
.ndc-traveler-dashboard-actions {
    margin-top: 20px;
    text-align: center;
}

.ndc-traveler-dashboard-actions .button {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.ndc-traveler-dashboard-actions .button:hover {
    background: #005a87;
    color: white;
}

/* Traveler Mobile Responsive */
@media (max-width: 768px) {
    .ndc-traveler-flight-search .ndc-search-row {
        flex-direction: column;
    }
    
    .ndc-traveler-flight-search .ndc-field-group {
        min-width: auto;
    }
    
    .ndc-traveler-booking-info-grid {
        grid-template-columns: 1fr;
    }
    
    .ndc-traveler-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .ndc-traveler-recent-search-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .ndc-traveler-compact-search .ndc-traveler-search-row {
        flex-direction: column;
    }
}

/* WooCommerce Integration */
.woocommerce .ndc-passenger-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.woocommerce .ndc-passenger-group h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.woocommerce .ndc-passenger-group .form-row {
    margin-bottom: 15px;
}

.woocommerce .ndc-passenger-group .form-row label {
    font-weight: 600;
    color: #333;
}

/* Cart and Checkout Styles */
.ndc-flight-details-cart {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.ndc-flight-details-cart strong {
    color: #333;
}

.ndc-flight-icon {
    font-size: 24px;
    text-align: center;
    line-height: 1;
}

.ndc-flight-details-order {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

/* Order Status Styles */
.ndc-booking-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.ndc-booking-status.ndc-status-confirmed {
    background: #d4edda;
    color: #155724;
}

.ndc-booking-status.ndc-status-pending {
    background: #fff3cd;
    color: #856404;
}

.ndc-booking-status.ndc-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.ndc-booking-status.ndc-status-none {
    color: #6c757d;
}

/* Checkout Passenger Fields */
#ndc_passenger_fields {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

#ndc_passenger_fields h3 {
    margin-top: 0;
    color: #333;
}

/* My Account Booking Actions */
.ndc-booking-actions {
    margin-top: 10px;
}

.ndc-booking-actions .button {
    margin-right: 10px;
    margin-bottom: 5px;
}

/* Order Details */
.ndc-booking-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #007cba;
}

.ndc-booking-info h3 {
    margin-top: 0;
    color: #333;
}

.ndc-booking-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.ndc-booking-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.ndc-booking-detail:last-child {
    border-bottom: none;
}

.ndc-booking-detail strong {
    color: #333;
}

/* Admin Order Styles */
.ndc-booking-admin-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #007cba;
}

.ndc-booking-admin-info h3 {
    margin-top: 0;
    color: #333;
}

.ndc-booking-admin-actions {
    margin-top: 15px;
}

/* Email Styles */
.ndc-email-booking-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.ndc-email-booking-info h3 {
    margin-top: 0;
    color: #333;
}

.ndc-email-flight-details {
    margin: 15px 0;
}

.ndc-email-passenger-info {
    margin: 15px 0;
}

.ndc-email-passenger-info h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

/* Print Styles */
@media print {
    .ndc-search-button,
    .ndc-add-to-cart,
    .ndc-view-details,
    .ndc-booking-actions {
        display: none;
    }
    
    .ndc-flight-offer,
    .ndc-booking-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
