/**
 * PRESTOLITE TURKEY - Form Control Styles
 * Bootstrap 5 tabanlı, Prestolite renklerine uyarlanmış
 */

/* ============================================
   STANDART FORM-CONTROL
   ============================================ */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #0174C4;
    appearance: none;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Focus state - Prestolite mavisi */
.form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #0174C4; /* Prestolite Blue */
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(1, 116, 196, 0.25); /* Prestolite Blue shadow */
}

/* Placeholder */
.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Disabled state */
.form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

/* Readonly state */
.form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1;
}

/* ============================================
   PRESTOLITE ÖZEL VARIANTS
   ============================================ */

/* Primary (Prestolite Blue) */
.form-control-primary:focus {
    border-color: #0174C4;
    box-shadow: 0 0 0 0.25rem rgba(1, 116, 196, 0.25);
}

/* Light Blue */
.form-control-light:focus {
    border-color: #0e8ce4;
    box-shadow: 0 0 0 0.25rem rgba(14, 140, 228, 0.25);
}

/* ============================================
   SIZES
   ============================================ */

/* Small */
.form-control-sm {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

/* Large */
.form-control-lg {
    min-height: calc(1.5em + 1rem + 2px);
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.5rem;
}

/* ============================================
   SPECIFIC INPUTS
   ============================================ */

/* Textarea */
textarea.form-control {
    min-height: calc(1.5em + 0.75rem + 2px);
}

/* Select */
select.form-control {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* Color input */
.form-control[type="color"] {
    height: calc(1.5em + 0.75rem + 2px);
}

/* File input */
.form-control[type="file"] {
    overflow: hidden;
}

.form-control::file-selector-button {
    padding: 0.375rem 0.75rem;
    margin: -0.375rem -0.75rem;
    margin-inline-end: 0.75rem;
    color: #212529;
    background-color: #e9ecef;
    pointer-events: none;
    border-color: inherit;
    border-style: solid;
    border-width: 0;
    border-inline-end-width: 1px;
    border-radius: 0;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:hover:not(:disabled):not([readonly])::file-selector-button {
    background-color: #dde0e3;
}

/* ============================================
   VALIDATION STATES
   ============================================ */

/* Invalid */
.form-control.is-invalid,
.was-validated .form-control:invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus,
.was-validated .form-control:invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Valid */
.form-control.is-valid,
.was-validated .form-control:valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid:focus,
.was-validated .form-control:valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .form-control {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .form-control-sm {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .form-control {
        font-size: 0.875rem;
        padding: 0.625rem 0.75rem;
    }
}

/* ============================================
   PRESTOLITE SEARCH INPUT (Header)
   ============================================ */

.header_search_input.form-control {
    height: 150px;
    padding-left: 20px;
    padding-right: 60px; /* Space for button */
    font-size: 14px;
    border: none;
    border-radius: 5px;
}

.header_search_input.form-control:focus {
    border-color: #0174C4;
    box-shadow: 0 0 0 0.25rem rgba(1, 116, 196, 0.15);
}

/* ============================================
   FILTER SECTION INPUTS
   ============================================ */

.filter_section .form-control {
    font-size: 14px;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

.filter_section .form-control:focus {
    border-color: #0174C4;
    box-shadow: 0 0 0 0.2rem rgba(1, 116, 196, 0.2);
}

/* ============================================
   ANIMATION (Reduced motion)
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .form-control {
        transition: none;
    }
    
    .form-control::file-selector-button {
        transition: none;
    }
}
