@import url("https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css");

/* ==========================================
   ESTILOS GLOBALES DE COMPRAS (DE app.css)
   ========================================== */

html, body {
    font-family: Calibri, Helvetica, Arial, sans-serif;
}

html {
    font-size: 16px;
}

body {
    font-size: 16px;
    color: #000;
}

/* Scrollbars Homologadas */
* {
    scrollbar-width: thin;
    scrollbar-color: #5e77ab #f3f3f3;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #f3f3f3;
}

*::-webkit-scrollbar-thumb {
    background: #5e77ab;
    border-radius: 8px;
    border: 2px solid #f3f3f3;
}

*::-webkit-scrollbar-thumb:hover {
    background: #50679a;
}

/* Homologación de Botones (Esquinas Rectas) */
.btn {
    border-radius: 0;
    background-color: #eeeeee;
    border-color: #cccccc;
}

.btn:hover {
    background-color: #e1e1e1;
    color: #000;
    transition: color ease 300ms;
}

.btn-agregar {
    font-weight: bold;
    color: #000;
}

/* Colores Semánticos de Iconos y Estados */
.text-success {
    color: #8CC152 !important;
}

.text-warning {
    color: #f6bb42 !important;
}

.text-danger {
    color: #e9573f !important;
}

/* Enfoque de Controles e Inputs */
input:not([type=checkbox]):not([type=radio]):focus,
input:not([type=checkbox]):not([type=radio]):focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible,
.form-control:focus,
.form-control:focus-visible {
    outline: none !important;
    border: 1px solid #6d84b7 !important;
    box-shadow: none;
}

.control-label {
    font-weight: 300;
    color: #000;
    padding: 0 !important;
}

.form-control {
    height: 25px !important;
    padding: 2px 5px 2px 3px !important;
    border-radius: 0;
    color: #000 !important;
    font-size: 13px !important;
}


/* ===================================================
   ESTILOS ESPECÍFICOS DE CATÁLOGO (DE proveedores.razor.css)
   =================================================== */

.prov-page {
    position: relative;
    min-height: 34rem;
}

.prov-toolbar-label {
    color: #333;
    font-size: 0.82rem;
    white-space: nowrap;
}

.prov-toolbar-select {
    padding: 0.3rem 0.45rem;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #fff;
    font-size: 0.82rem;
    color: #333;
    height: 30px;
}

.prov-toolbar-date {
    width: 10rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #fff;
    font-size: 0.82rem;
    color: #333;
    cursor: default;
    height: 30px;
}

.prov-menu-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.prov-form-row > [class*="col-"] {
    margin-bottom: 0.9rem;
}

/* Autocompletado */
.prov-autocomplete-field {
    position: relative;
}

.prov-autocomplete {
    position: relative;
}

.prov-autocomplete-input {
    padding-right: 2rem;
    background-color: #fff;
    background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
    background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.prov-autocomplete-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    max-height: 16rem;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #6d84b7;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    z-index: 1000;
}

.prov-autocomplete-item {
    display: block;
    position: relative;
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
    color: #333;
    text-align: left;
}

.prov-autocomplete-item:last-child {
    border-bottom: 0;
}

.prov-autocomplete-item:hover,
.prov-autocomplete-item:focus {
    background: #f5f8ff;
    outline: none;
}

/* Modales (Sin ::deep porque es cargado globalmente) */
.prov-page .prov-modal-overlay {
    overflow: visible !important;
}

.prov-page .prov-modal-body-overlay {
    overflow: visible !important;
}

.prov-modal-overlay {
    overflow: visible !important;
}

.prov-modal-body-overlay {
    overflow: visible !important;
}

.prov-modal__body .form-label {
    margin-bottom: 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
}

.prov-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

/* Grid del Formulario */
.prov-form-grid {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 0.55rem 0.75rem;
    align-items: center;
}

.prov-label {
    text-align: right;
    white-space: nowrap;
    margin: 0;
}

.prov-readonly-input {
    background-color: #f5f5f5 !important;
    color: #000 !important;
    cursor: default !important;
}

@media (max-width: 480px) {
    .prov-form-grid {
        grid-template-columns: 1fr;
        gap: 0.15rem 0;
    }

    .prov-label {
        margin-top: 0.5rem;
        margin-bottom: 0;
    }
}

/* Validación */
.prov-form-row input.valid:not([type="checkbox"]),
.prov-form-row textarea.valid,
.prov-form-row select.valid {
    border-color: #ccc !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

.prov-form-row input.valid:not([type="checkbox"]):focus,
.prov-form-row textarea.valid:focus,
.prov-form-row select.valid:focus {
    outline: none !important;
    box-shadow: none !important;
    background-image: none !important;
    border: 1px solid #6d84b7 !important;
}

.valid.modified:not([type=checkbox]) {
    border-color: #ccc !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: none !important;
}
