/**
 * Vehicle Selector Widget - MİNİMAL & MODERN
 * Eklenti renklerine uygun, SEO uyumlu
 */

/* ==========================================================================
   BASE CONTAINER - SEO UYUMLU
   ========================================================================== */

.aus-vehicle-selector-widget {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 28px; /* DAHA AZ PADDING */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: none;
    position: relative;
    overflow: visible;
    animation: fade-in 0.4s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   HEADER - Minimal
   ========================================================================== */

.aus-vs-header {
    text-align: center;
    margin-bottom: 20px; /* DAHA AZ MARGIN */
}

.aus-vs-title {
    font-size: 28px; /* DAHA KÜÇÜK */
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 8px 0; /* DAHA AZ MARGIN */
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.aus-vs-subtitle {
    font-size: 14px; /* DAHA KÜÇÜK */
    color: #616161;
    margin: 0 0 16px 0; /* DAHA AZ MARGIN */
    line-height: 1.5;
    font-weight: 500;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}


/* ==========================================================================
   FORM LAYOUT
   ========================================================================== */

.aus-vs-form {
    margin-top: 16px; /* DAHA AZ MARGIN */
}

.aus-vs-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto; /* 3 SÜTUN + BUTON */
    gap: 12px; /* DAHA AZ GAP */
    align-items: end;
}

/* Buton hizalaması - label yüksekliği kadar margin */
.aus-vs-field {
    display: flex;
    flex-direction: column;
}

.aus-vs-button {
    height: 50px; /* DAHA KISA */
    margin-top: 20px; /* DAHA AZ MARGIN */
    align-self: end;
    justify-self: center;
}

/* ==========================================================================
   FIELDS
   ========================================================================== */

.aus-vs-field {
    position: relative;
}

.aus-vs-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #424242;
    margin-bottom: 4px; /* DAHA AZ BOŞLUK - BİRLEŞİK */
    letter-spacing: 0.01em;
}

/* ==========================================================================
   INPUT WRAPPER
   ========================================================================== */

.aus-vs-input-wrapper {
    position: relative;
    width: 100%;
    z-index: 1; /* Autocomplete için z-index context */
}

.aus-vs-year-wrapper,
.aus-vs-model-wrapper {
    position: relative;
    z-index: 1;
}

.aus-vs-input {
    width: 100%;
    height: 50px; /* DAHA KISA */
    padding: 0 44px 0 16px; /* DAHA AZ PADDING */
    font-size: 14px; /* DAHA KÜÇÜK */
    font-weight: 600;
    color: #1a1a1a;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.aus-vs-input:hover {
    border-color: #bdbdbd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.aus-vs-input:focus {
    border-color: #007bff;
    box-shadow: 
        0 0 0 3px rgba(0, 123, 255, 0.1),
        0 4px 12px rgba(0, 123, 255, 0.12);
}

.aus-vs-input:disabled {
    background: #fafafa;
    border-color: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    box-shadow: none;
}

.aus-vs-input::placeholder {
    color: #9e9e9e;
    font-weight: 500;
}

/* Input Icon */
.aus-vs-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    pointer-events: none;
    transition: color 0.25s ease;
    width: 20px;
    height: 20px;
}

.aus-vs-input:focus ~ .aus-vs-input-icon {
    color: #007bff;
}

/* ==========================================================================
   AUTCOMPLETE DROPDOWN - SEO UYUMLU
   ========================================================================== */

.aus-vs-autocomplete {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #007bff;
    border-radius: 10px;
    box-shadow: 
        0 10px 28px rgba(0, 123, 255, 0.18),
        0 4px 10px rgba(0, 0, 0, 0.1);
    max-height: 340px;
    overflow-y: auto;
    z-index: 9999; /* Yüksek z-index - container'a takılmıyor */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.aus-vs-autocomplete.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.aus-vs-autocomplete-item {
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #212121;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

.aus-vs-autocomplete-item:last-child {
    border-bottom: none;
}

.aus-vs-autocomplete-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #007bff;
    transition: width 0.25s ease;
}

.aus-vs-autocomplete-item:hover {
    background: #007bff;
    color: #ffffff;
    padding-left: 24px;
}

.aus-vs-autocomplete-item.is-selected {
    background: #f0f7ff;
    color: #007bff;
    font-weight: 700;
}

.aus-vs-autocomplete-item.is-selected:hover {
    background: #007bff;
    color: #ffffff;
}

.aus-vs-autocomplete-item:hover::before {
    width: 4px;
}

.aus-vs-autocomplete-item:first-child {
    border-radius: 8px 8px 0 0;
}

.aus-vs-autocomplete-item:last-child {
    border-radius: 0 0 8px 8px;
}

.aus-vs-autocomplete-item:only-child {
    border-radius: 8px;
}

.aus-vs-autocomplete-empty {
    padding: 28px 20px;
    text-align: center;
    color: #9e9e9e;
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================================================
   LOADING SPINNER
   ========================================================================== */

.aus-vs-loading {
    position: absolute;
    right: 48px; /* ICON'DAN SONRA - HİZALI */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aus-vs-spinner {
    animation: spin 1s linear infinite;
    color: #007bff;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   SUBMIT BUTTON - DÜZGÜN HOVER
   ========================================================================== */

.aus-vs-button {
    height: 56px;
    padding: 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff; /* BEYAZ YAZI - HOVER'DA DA BEYAZ KALACAK */
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    white-space: nowrap;
    min-width: 180px;
}

.aus-vs-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%); /* DAHA KOYU MAVİ */
    color: #ffffff; /* BEYAZ YAZI KALIYOR */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.aus-vs-button:active:not(:disabled) {
    transform: translateY(0);
}

.aus-vs-button:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    box-shadow: none;
    cursor: not-allowed;
}

.aus-vs-button-icon {
    transition: transform 0.25s ease;
    width: 20px;
    height: 20px;
}

.aus-vs-button:hover:not(:disabled) .aus-vs-button-icon {
    transform: translateX(4px);
}

/* ==========================================================================
   ERROR MESSAGE
   ========================================================================== */

.aus-vs-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 16px;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc3545;
    font-size: 13px;
    font-weight: 600;
}

.aus-vs-error svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   RESPONSIVE - KOMPAKT MOBİL
   ========================================================================== */

@media (max-width: 968px) {
    .aus-vs-inputs {
        grid-template-columns: 1fr 1fr; /* 2 SÜTUN */
    }
    
    .aus-vs-button {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .aus-vehicle-selector-widget {
        padding: 24px 18px;
        border-radius: 12px;
    }
    
    .aus-vs-header {
        margin-bottom: 20px;
    }
    
    .aus-vs-title {
        font-size: 26px;
    }
    
    .aus-vs-subtitle {
        font-size: 14px;
    }
    
    .aus-vs-inputs {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .aus-vs-button {
        grid-column: auto;
        width: 100%;
        min-width: 0;
        margin-top: 0; /* Mobilde label yok, margin sıfır */
        justify-self: stretch; /* Mobilde tam genişlik */
    }
    
    .aus-vs-input {
        height: 52px;
        font-size: 14px;
    }
    
    .aus-vs-button {
        height: 52px;
    }
}

@media (max-width: 480px) {
    .aus-vehicle-selector-widget {
        padding: 20px 14px;
    }
    
    .aus-vs-title {
        font-size: 22px;
    }
    
    .aus-vs-subtitle {
        font-size: 13px;
    }
    
    .aus-vs-label {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .aus-vs-input,
    .aus-vs-button {
        height: 48px !important;
        font-size: 14px !important;
    }
    
    .aus-vs-button {
        margin-top: 0; /* Mobilde margin sıfır */
    }
}

/* ==========================================================================
   ELEMENTOR EDITOR
   ========================================================================== */

.elementor-editor-active .aus-vs-input,
.elementor-editor-active .aus-vs-button {
    pointer-events: none;
}
