/**
 * WooCommerce Vehicle Compatibility Filter - Frontend Stylesheet
 * Responsive, Mobile-First, Clean Light Design, Woodmart Theme Compatible
 */

.wc-vehicle-compatibility-box {
    margin: 18px 0 22px 0;
    padding: 18px 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    box-sizing: border-box;
    width: 100%;
    clear: both;
    font-family: inherit;
    display: block;
}

/* Woodmart & Single Product Summary visual alignment */
.single-product .summary.entry-summary .wc-vehicle-compatibility-box[data-wc-vehicle-source="automatic"],
.single-product .woodmart-product-summary .wc-vehicle-compatibility-box[data-wc-vehicle-source="automatic"],
.single-product-page .wc-vehicle-compatibility-box[data-wc-vehicle-source="automatic"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    float: none;
}

.wc-vehicle-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.wc-vehicle-car-icon {
    stroke: #0f172a;
    flex-shrink: 0;
}

.wc-vehicle-box-title {
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.wc-vehicle-fields-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

@media (min-width: 540px) {
    .wc-vehicle-fields-wrapper {
        grid-template-columns: 1fr 1fr;
    }
    .wc-vehicle-action-group {
        grid-column: span 2;
    }
}

.wc-vehicle-field-group {
    position: relative;
    width: 100%;
}

.wc-vehicle-select {
    width: 100% !important;
    height: 45px !important;
    line-height: 45px !important;
    padding: 0 14px !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    color: #1e293b !important;
    cursor: pointer;
    outline: none !important;
    transition: all 0.2s ease-in-out;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

[dir="rtl"] .wc-vehicle-select {
    background-position: left 12px center;
}

.wc-vehicle-select:focus {
    border-color: #0f172a !important;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1) !important;
}

.wc-vehicle-select:disabled {
    background-color: #f1f5f9 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    border-color: #e2e8f0 !important;
}

.wc-vehicle-verify-btn {
    width: 100%;
    height: 45px;
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    padding: 0 16px;
}

.wc-vehicle-verify-btn:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
}

.wc-vehicle-verify-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.wc-vehicle-verify-btn .btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: wc-spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes wc-spin {
    to { transform: rotate(360deg); }
}

/* Result Badges */
.wc-vehicle-result-container {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: wc-fade-in 0.25s ease-out;
}

@keyframes wc-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.wc-vehicle-result-container.is-compatible {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.wc-vehicle-result-container.is-not-compatible {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.wc-vehicle-result-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}
