/**
 * Search Form Styles
 * Clean, professional styling for the pump search form
 */

.rp-search-form-container {
    max-width: 850px;              /* Control width here now */
   margin: 0 auto 0px auto; /* Add bottom margin to separate from shop */
    background: #ffffff;
    border: 4px solid #287b3a;
    border-radius: 8px;
    padding: 5px 20px; /* Reduced from 30px */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.rp-search-heading {
    font-size: 1.4rem !important; /* Reduced from 1.75rem */
    color: #2d7a3e !important;
    font-weight: 700 !important;
    margin: 0 0 2px 0 !important; /* Less margin */
    text-align: center !important;
}

.rp-search-subheading {
   font-size: 0.9rem !important; /* Reduced from 1rem */
    color: #666 !important;
    margin: 0 0 8px 0 !important; /* Less margin */
    text-align: center !important;
}

.rp-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 10px;
    align-items: flex-start;
}

.rp-form-field {
    display: flex;
    flex-direction: column;
}

.rp-form-field label {
    font-weight: 600;
    margin-bottom: 6px; /* Reduced from 8px */
    color: #333;
    font-size: 0.85rem !important; /* Smaller */
    display: block;
}

.rp-label-required {
    color: #d63638;
    margin-left: 3px;
}

.rp-label-optional {
    font-weight: 400;
    color: #999;
    font-size: 0.75rem !important; /* Smaller */
    margin-left: 5px;
}

.rp-form-field select {
    padding: 10px 12px; /* Reduced from 12px 15px */
    font-size: 0.9rem !important; /* Smaller text */
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.rp-form-field select:hover:not(:disabled) {
    border-color: #2d7a3e;
}

.rp-form-field select:focus {
    outline: none;
    border-color: #2d7a3e;
    box-shadow: 0 0 0 3px rgba(45, 122, 62, 0.1);
}

.rp-form-field select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.rp-field-hint {
     font-size: 0.75rem !important; /* Smaller */
    color: #666;
    margin: 4px 0 0 0;
    font-style: italic;
}

.rp-form-submit {
    margin-top: 1px;
    text-align: center;
    display: flex;
    gap: 0px;
    justify-content: center;
    flex-wrap: wrap;
}

.rp-search-submit-btn,
.rp-reset-btn {
    background-color: #2d7a3e;
    color: #ffffff;
    border: none;
    padding: 15px 15px;
   font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.rp-reset-btn {
    background-color: #6c757d;
}

.rp-search-submit-btn:hover {
    background-color: #245d30;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(45, 122, 62, 0.3);
}

.rp-reset-btn:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.rp-search-submit-btn:active,
.rp-reset-btn:active {
    transform: translateY(0);
}

.rp-btn-icon {
     font-size: 0.75rem;
}

.rp-search-help {
    margin-top: 30px;
    padding-top: 40px;
    text-align: center;
}

.rp-help-text {
     font-size: 0.75rem;
    color: #666;
    margin: 0;
}

.rp-help-text strong {
    color: #333;
}

.rp-help-text a {
    color: #2d7a3e;
    text-decoration: none;
    font-weight: 600;
}

.rp-help-text a:hover {
    text-decoration: underline;
}

/* Responsive styles */
@media (max-width: 768px) {
    .rp-search-form-container {
        padding: 30px 20px;
    }
    
    .rp-search-heading {
        font-size: 0.8rem;
    }
    
    .rp-search-subheading {
        font-size: 0.6rem;
    }
    
    /* ADD THESE NEW LINES: */
    .rp-form-fields {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .rp-form-field:nth-child(1),
    .rp-form-field:nth-child(2),
    .rp-form-field:nth-child(3) {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    
    .rp-search-help {
        margin-top: 15px !important;
        order: 3 !important;
    }
    
    .rp-form-submit {
        order: 2 !important;
    }
    /* END NEW LINES */
    
    .rp-form-submit {
        flex-direction: column;
    }
    
    .rp-search-submit-btn,
    .rp-reset-btn {
        width: 100%;
        justify-content: center;
    }
    
    .rp-contact-btn {
        width: auto !important;
        max-width: 250px !important;
        margin: 0 auto !important;
        display: inline-block !important;
    }
}

/* Select2 customization */
.rp-search-form-container .select2-container--default .select2-selection--single {
    height: 48px;
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 4px;
}

.rp-search-form-container .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important; /* Match height */
    padding-left: 10px;
    font-size: 0.9rem;
}

.rp-search-form-container .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}

.rp-search-form-container .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #2d7a3e;
    box-shadow: 0 0 0 3px rgba(45, 122, 62, 0.1);
}

.rp-search-form-container .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.rp-search-form-container .select2-dropdown {
    border: 2px solid #2d7a3e;
    border-radius: 4px;
}

.rp-search-form-container .select2-results__option--highlighted[aria-selected] {
    background-color: #2d7a3e !important;
}

.rp-search-form-container .select2-search--dropdown .select2-search__field {
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 8px;
}

.rp-search-form-container .select2-search--dropdown .select2-search__field:focus {
    border-color: #2d7a3e;
    outline: none;
}

/* Brand dropdown - spans 2 rows */
.rp-form-field:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / 3;
}

/* Model dropdown */
.rp-form-field:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

/* Variation dropdown */
.rp-form-field:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.rp-search-help {
    grid-column: 1;
    grid-row: 3;
    margin-top: -70px;
    padding-top: 0;
}

.rp-help-heading {
    font-size: 0.95rem !important; /* Smaller */
    color: #2d7a3e;
    font-weight: 600;
    margin: 0 0 0px 0 !important; /* Less margin */
    line-height: 1.3;
}

.rp-search-help .rp-contact-btn {
    background-color: #FFC107 !important;
    color: #000000;
    padding: 15px 15px !important;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem !important;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.rp-contact-btn:hover {
    background-color: #E5A800;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(253, 185, 19, 0.4);
}

/* Buttons - right column */
.rp-form-submit {
    grid-column: 2;
    grid-row: 3;
    margin-top: 0;
    display: flex;
    gap: 10px; /* Reduced from 12px */
    justify-content: flex-start;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .rp-search-form-container {
        max-width: 100%;
        padding: 10px 20px;
    }
    
    .rp-form-fields {
        display: flex;
        flex-direction: column;
    }
    
    .rp-form-field:nth-child(1),
    .rp-form-field:nth-child(2),
    .rp-form-field:nth-child(3),
    .rp-search-help,
    .rp-form-submit {
        grid-column: 1;
        grid-row: auto;
    }
    
    .rp-form-submit {
        flex-direction: column;
        gap: 10px;
        order: 2;
    }
    
    .rp-search-submit-btn,
    .rp-reset-btn {
        padding: 10px 10px;
        font-size: 0.9rem !important;
        font-weight: 600;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    
    .rp-search-help {
        margin-top: 15px;
        margin-bottom: 15px;
        order: 3;
    }
    
    .rp-contact-btn {
        width: auto !important;
        max-width: 250px !important;
        margin: 0 auto !important;
        display: inline-block !important;
    }
}