/**
 * My Rail App - Main Stylesheet
 * 
 * All styling for the rail search plugin
 */

/* Container */
.rail-search-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.rail-search-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #003366;
}

/* Form Styles */
.rail-search-form {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rail-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.rail-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rail-form-group label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333333;
}

.rail-form-group input[type="text"],
.rail-form-group input[type="date"],
.rail-form-group input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.rail-form-group input[type="text"]:focus,
.rail-form-group input[type="date"]:focus,
.rail-form-group input[type="number"]:focus {
    outline: none;
    border-color: #008080;
    box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.1);
}

/* Autocomplete */
.rail-autocomplete {
    position: relative;
}

.rail-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rail-autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.rail-autocomplete-item:hover {
    background-color: #f5f5f5;
}

.rail-autocomplete-item:last-child {
    border-bottom: none;
}

/* Search Button */
.rail-search-button {
    background-color: #FF6B35;
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.rail-search-button:hover {
    background-color: #e55a2b;
}

.rail-search-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Search Results */
.rail-search-results {
    margin-top: 32px;
}

.rail-loading {
    text-align: center;
    padding: 40px;
    color: #666666;
    font-size: 16px;
}

.rail-no-results,
.rail-error {
    text-align: center;
    padding: 40px;
    color: #666666;
    font-size: 16px;
    background: #f5f5f5;
    border-radius: 4px;
}

.rail-error {
    color: #DC3545;
    background: #ffe6e6;
}

.rail-results-list {
    display: grid;
    gap: 16px;
}

.rail-offer-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.rail-offer-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.rail-offer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rail-offer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #003366;
}

.rail-offer-price {
    font-size: 24px;
    font-weight: 700;
    color: #008080;
}

.rail-offer-details {
    margin-bottom: 16px;
    color: #666666;
    font-size: 14px;
}

.rail-select-offer {
    background-color: #008080;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rail-select-offer:hover {
    background-color: #006666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rail-form-row {
        flex-direction: column;
        gap: 12px;
    }

    .rail-offer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .rail-offer-price {
        font-size: 20px;
    }
}

