/**
 * VIN Part Search Styles
 * Highway 71 Module Services
 */

/* Container */
.h71-vin-search-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.h71-vin-search-title {
    text-align: center;
    margin-bottom: 25px;
    color: #1a1a1a;
    font-size: 1.8em;
    font-weight: 700;
}

/* Tabs */
.h71-search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 0;
}

.h71-tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.h71-tab-btn:hover {
    color: #2271b1;
    background: #f8f9fa;
}

.h71-tab-btn.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.h71-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.h71-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Styles */
.h71-form-group {
    margin-bottom: 20px;
}

.h71-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.h71-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .h71-form-row {
        grid-template-columns: 1fr;
    }
}

/* VIN Input */
.h71-input-wrapper {
    display: flex;
    gap: 10px;
}

.h71-input-wrapper input[type="text"] {
    flex: 1;
    padding: 15px 18px;
    font-size: 1.1em;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.h71-input-wrapper input[type="text"]:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.h71-input-wrapper input[type="text"]::placeholder {
    letter-spacing: 1px;
    text-transform: none;
}

/* Select Inputs */
.h71-form-group select,
.h71-form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.h71-form-group select:focus,
.h71-form-group input[type="text"]:focus {
    outline: none;
    border-color: #2271b1;
}

/* Search Button */
.h71-search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.h71-search-btn:hover {
    background: linear-gradient(135deg, #135e96, #0a4570);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.h71-search-btn.h71-full-width {
    width: 100%;
}

.h71-search-btn .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Help Text */
.h71-vin-help {
    margin-top: 10px;
    color: #666;
}

.h71-vin-help small {
    font-size: 0.9em;
}

/* Vehicle Info Box */
.h71-vehicle-info {
    background: linear-gradient(135deg, #f0f7fc, #e8f4fd);
    border: 1px solid #b8daff;
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
}

.h71-vehicle-info h3 {
    margin: 0 0 15px 0;
    color: #0a4570;
    font-size: 1.2em;
}

.h71-vehicle-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.h71-vehicle-detail {
    background: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.h71-vehicle-detail .label {
    font-size: 0.8em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.h71-vehicle-detail .value {
    font-size: 1.1em;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 3px;
}

/* Options Filter */
.h71-options-filter {
    background: #fffbeb;
    border: 1px solid #f0c36d;
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
}

.h71-options-filter h3 {
    margin: 0 0 10px 0;
    color: #92400e;
    font-size: 1.1em;
}

.h71-options-help {
    color: #78350f;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.h71-options-selects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.h71-options-selects select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1a054;
    border-radius: 6px;
    background: #fff;
    font-size: 0.95em;
}

.h71-options-selects label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: #78350f;
    margin-bottom: 5px;
}

.h71-apply-filters-btn {
    padding: 12px 25px;
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.h71-apply-filters-btn:hover {
    background: #d97706;
}

/* Results Section */
.h71-search-results {
    margin-top: 30px;
}

.h71-search-results h3 {
    margin-bottom: 15px;
    color: #1a1a1a;
    font-size: 1.3em;
}

.h71-results-summary {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.h71-results-summary .count {
    font-weight: 600;
    color: #166534;
}

.h71-results-summary .in-stock {
    color: #15803d;
    font-weight: 500;
}

/* Results Grid */
.h71-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Part Card */
.h71-part-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.h71-part-card:hover {
    border-color: #2271b1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.h71-part-card-image {
    position: relative;
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
}

.h71-part-card-image img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.h71-part-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.h71-part-card-badge.in-stock {
    background: #dcfce7;
    color: #166534;
}

.h71-part-card-badge.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

.h71-part-card-content {
    padding: 15px 20px;
}

.h71-part-card-type {
    font-size: 0.8em;
    color: #2271b1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.h71-part-card-title {
    font-size: 1em;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
    line-height: 1.3;
}

.h71-part-card-sku {
    font-size: 0.85em;
    color: #666;
    font-family: monospace;
    margin-bottom: 10px;
}

.h71-part-card-apps {
    font-size: 0.85em;
    color: #555;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.h71-part-card-apps strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.h71-part-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.h71-part-card-price {
    font-size: 1.2em;
    font-weight: 700;
    color: #166534;
}

.h71-part-card-btn {
    padding: 10px 18px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    transition: background 0.3s ease;
}

.h71-part-card-btn:hover {
    background: #135e96;
    color: #fff;
}

/* Error State */
.h71-search-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    color: #991b1b;
    text-align: center;
}

.h71-search-error .error-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

/* No Results */
.h71-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.h71-no-results .icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.h71-no-results h4 {
    color: #333;
    margin-bottom: 10px;
}

.h71-no-results p {
    max-width: 400px;
    margin: 0 auto;
}

/* Loading State */
.h71-loading {
    text-align: center;
    padding: 40px;
}

.h71-loading .spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e5e5;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* Responsive */
@media (max-width: 600px) {
    .h71-vin-search-container {
        padding: 20px 15px;
    }
    
    .h71-input-wrapper {
        flex-direction: column;
    }
    
    .h71-input-wrapper input[type="text"] {
        font-size: 1em;
        letter-spacing: 1px;
    }
    
    .h71-search-btn {
        width: 100%;
    }
    
    .h71-results-grid {
        grid-template-columns: 1fr;
    }
    
    .h71-vehicle-details {
        grid-template-columns: 1fr 1fr;
    }
}
