/**
 * Amadex Frontend Styles
 */

/* Container */
.amadex-flight-search-container {
    max-width: 100%;
    margin: 0 auto 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Themes */
.amadex-theme-light {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
}

.amadex-theme-dark {
    background-color: #333;
    color: #f8f9fa;
    border: 1px solid #222;
}

.amadex-theme-dark .amadex-flight-search-header {
    background-color: #222;
}

/* Header */
.amadex-flight-search-header {
    padding: 15px 20px;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
}

.amadex-flight-search-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Form Container */
.amadex-flight-search-form-container {
    padding: 20px;
}

/* Form */
.amadex-flight-search-form {
    display: block;
}

.amadex-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 15px;
}

.amadex-form-group {
    flex: 1 1 calc(50% - 20px);
    margin: 0 10px 15px;
    position: relative;
}

.amadex-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.amadex-form-group input,
.amadex-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.amadex-form-help {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

.amadex-form-submit {
    display: flex;
    align-items: flex-end;
}

.amadex-search-button {
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.amadex-search-button:hover {
    background-color: #005a87;
}

/* Autocomplete Wrapper */
.amadex-autocomplete-wrapper {
    position: relative;
    width: 100%;
}

/* Autocomplete Results Container */
.amadex-autocomplete-results {
    position: absolute;
    z-index: 9999;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    border-radius: 0 0 4px 4px;
}

.amadex-theme-dark .amadex-autocomplete-results {
    background: #444;
    border-color: #555;
    color: #eee;
}

/* Autocomplete Item */
.amadex-autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.amadex-theme-dark .amadex-autocomplete-item {
    border-color: #555;
}

.amadex-autocomplete-item:last-child {
    border-bottom: none;
}

.amadex-autocomplete-item:hover {
    background-color: #f5f5f5;
}

.amadex-theme-dark .amadex-autocomplete-item:hover {
    background-color: #333;
}

/* No Results Message */
.amadex-no-results,
.amadex-loading-results,
.amadex-error-results {
    padding: 10px 15px;
    font-style: italic;
    color: #777;
}

.amadex-theme-dark .amadex-no-results,
.amadex-theme-dark .amadex-loading-results,
.amadex-theme-dark .amadex-error-results {
    color: #bbb;
}

.amadex-error-results {
    color: #d9534f;
}

/* Loading indicator */
.amadex-loading {
    text-align: center;
    padding: 20px;
}

.amadex-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 115, 170, 0.2);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: amadex-spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes amadex-spin {
    to { transform: rotate(360deg); }
}

/* Flight Results */
.amadex-flight-results {
    padding: 20px;
}

.amadex-results-header {
    margin-bottom: 20px;
}

.amadex-results-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

/* Flight Cards */
.amadex-flight-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.amadex-flight-card {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 15px;
}

.amadex-theme-dark .amadex-flight-card {
    background-color: #444;
    border-color: #555;
}

.amadex-price-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #0073aa;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
}

.amadex-flight-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.amadex-flight-price {
    font-size: 18px;
    font-weight: 600;
    color: #0073aa;
}

.amadex-flight-code {
    font-size: 14px;
    color: #666;
}

.amadex-theme-dark .amadex-flight-code {
    color: #ccc;
}

.amadex-select-flight {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

.amadex-select-flight:hover {
    background-color: #005a87;
}

/* Responsive styles */
@media (max-width: 768px) {
    .amadex-form-row {
        flex-direction: column;
    }
    
    .amadex-form-group {
        flex: 1 1 100%;
        margin: 0 0 15px 0;
    }
}