/* ========================================
 * ESTILOS CENTRALIZADOS - SISTEMA DE ENTREGAS
 * ======================================== */

/* Estilos para Inputs */
.form-control,
.form-select,
.form-check-input {
    border-radius: 12px !important;
    border: 2px solid #e9ecef !important;
    padding: 0.75rem 1rem !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15) !important;
    transform: translateY(-1px) !important;
    background: #ffffff !important;
}

.form-control:hover,
.form-select:hover {
    border-color: #adb5bd !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* Input Groups */
.input-group .form-control {
    border-radius: 12px 0 0 12px !important;
}

.input-group .input-group-text {
    border-radius: 0 12px 12px 0 !important;
    border: 2px solid #e9ecef !important;
    background: #f8f9fa !important;
    color: #6c757d !important;
    font-weight: 500 !important;
}

.input-group .form-control:focus + .input-group-text {
    border-color: #667eea !important;
    background: #667eea !important;
    color: white !important;
}

/* Labels */
.form-label {
    font-weight: 600 !important;
    color: #495057 !important;
    margin-bottom: 0.5rem !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Textarea */
textarea.form-control {
    min-height: 100px !important;
    resize: vertical !important;
    line-height: 1.6 !important;
}

/* Select */
.form-select {
    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='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.5rem !important;
}

/* Checkboxes e Radios */
.form-check-input {
    width: 1.2em !important;
    height: 1.2em !important;
    margin-top: 0.25em !important;
    border-radius: 6px !important;
    border: 2px solid #dee2e6 !important;
    background-color: #fff !important;
    transition: all 0.3s ease !important;
}

.form-check-input:checked {
    background-color: #667eea !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25) !important;
}

.form-check-input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25) !important;
}

.form-check-label {
    font-weight: 500 !important;
    color: #495057 !important;
    margin-left: 0.5rem !important;
    cursor: pointer !important;
}

/* Form Switches */
.form-switch {
    padding-left: 2.5em !important;
}

.form-switch .form-check-input {
    width: 3em !important;
    height: 1.5em !important;
    margin-left: -2.5em !important;
    border-radius: 1em !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.25%29'/%3e%3c/svg%3e") !important;
    background-position: left center !important;
    transition: all 0.3s ease !important;
}

.form-switch .form-check-input:checked {
    background-position: right center !important;
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

/* Input com ícones */
.input-with-icon {
    position: relative !important;
}

.input-with-icon .form-control {
    padding-left: 2.5rem !important;
}

.input-with-icon .input-icon {
    position: absolute !important;
    left: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #6c757d !important;
    z-index: 10 !important;
}

.input-with-icon .form-control:focus + .input-icon {
    color: #667eea !important;
}

/* Inputs com validação */
.form-control.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25) !important;
}

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

.valid-feedback {
    color: #28a745 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin-top: 0.25rem !important;
}

.invalid-feedback {
    color: #dc3545 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin-top: 0.25rem !important;
}

/* Inputs de busca */
.search-input {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

.search-input:focus {
    background: #ffffff !important;
    border-color: #667eea !important;
}

/* Inputs de data e hora */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    font-family: inherit !important;
}

/* Inputs numéricos */
input[type="number"] {
    -moz-appearance: textfield !important;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Placeholder personalizado */
.form-control::placeholder {
    color: #adb5bd !important;
    font-style: italic !important;
    opacity: 0.8 !important;
}

/* Inputs desabilitados */
.form-control:disabled,
.form-control[readonly] {
    background-color: #e9ecef !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Inputs com tamanhos específicos */
.form-control-sm {
    padding: 0.5rem 0.75rem !important;
    font-size: 13px !important;
    border-radius: 8px !important;
}

.form-control-lg {
    padding: 1rem 1.25rem !important;
    font-size: 16px !important;
    border-radius: 16px !important;
}

/* Inputs com cores temáticas */
.input-primary {
    border-color: #667eea !important;
}

.input-primary:focus {
    border-color: #5a6fd8 !important;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25) !important;
}

.input-success {
    border-color: #28a745 !important;
}

.input-success:focus {
    border-color: #1e7e34 !important;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25) !important;
}

.input-warning {
    border-color: #ffc107 !important;
}

.input-warning:focus {
    border-color: #e0a800 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25) !important;
}

.input-danger {
    border-color: #dc3545 !important;
}

.input-danger:focus {
    border-color: #c82333 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

/* Animações */
@keyframes inputFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.form-control:focus {
    animation: inputFocus 0.3s ease !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .form-control,
    .form-select {
        font-size: 16px !important; /* Evita zoom no iOS */
        padding: 0.875rem 1rem !important;
    }
    
    .form-label {
        font-size: 13px !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .form-control,
    .form-select {
        background: #2d3748 !important;
        border-color: #4a5568 !important;
        color: #e2e8f0 !important;
    }
    
    .form-control:focus,
    .form-select:focus {
        background: #2d3748 !important;
        border-color: #667eea !important;
    }
    
    .form-label {
        color: #e2e8f0 !important;
    }
    
    .form-control::placeholder {
        color: #a0aec0 !important;
    }
} 