/* ============================================================
   ESTANDARTE — quote.css
   Modal de solicitud de cotización. Figma 1660:5645 / 1660:5755.
   ============================================================ */

/* ----------------------------------------------------------
   1. Contenedor / overlay
   ---------------------------------------------------------- */
.quote-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.quote-modal.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.25s ease;
}
.quote-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 25, 70, 0.55);
}
html.quote-modal-open { overflow: hidden; }

.quote-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(14, 25, 70, 0.25);
    transform: translateY(12px);
    transition: transform 0.25s ease;
    overflow: hidden;
}
.quote-modal.is-open .quote-modal__dialog { transform: translateY(0); }
.quote-modal.is-loading .quote-modal__dialog { opacity: 0.65; pointer-events: none; }

.quote-modal__view {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 32px;
    overflow-y: auto;
}
/* El atributo hidden debe ganarle a display:flex (si no, la vista de éxito
   quedaría apilada debajo del formulario en vez de reemplazarlo). */
.quote-modal__view[hidden] { display: none; }

.quote-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: inline-flex;
    width: 36px;
    height: 36px;
    padding: 6px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #0e1946;
    cursor: pointer;
    transition: background 0.2s ease;
}
.quote-modal__close:hover { background: #f0f2f7; }
.quote-modal__close svg { width: 100%; height: 100%; }

/* ----------------------------------------------------------
   2. Formulario
   ---------------------------------------------------------- */
.quote-modal__title {
    margin: 0 40px 24px 0;
    color: var(--color-blue);
    font-weight: var(--fw-black);
    font-size: var(--fs-24);
    line-height: 1.2;
    text-transform: uppercase;
}

.quote-form { display: flex; flex-direction: column; gap: 28px; }
.quote-form__section { display: flex; flex-direction: column; gap: 16px; }
.quote-form__legend {
    margin: 0;
    color: #0e1946;
    font-weight: var(--fw-heavy);
    font-size: var(--fs-18);
}

.quote-form__row { display: flex; gap: 16px; }
.quote-form__field { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 0; }
.quote-form__field label { color: #0e1946; font-weight: var(--fw-heavy); font-size: var(--fs-16); }
.quote-form__opt { color: #8e92a6; font-weight: var(--fw-roman); }
.quote-form__field input {
    width: 100%;
    padding: 12px 16px;
    background: #f6f6f6;
    border: 1px solid #d4d4d4;
    border-radius: 5px;
    color: #0e1946;
    font-family: inherit;
    font-size: var(--fs-16);
}
.quote-form__field input::placeholder { color: rgba(0, 3, 47, 0.5); }
.quote-form__field input:focus { outline: none; border-color: var(--color-blue); }

.quote-form__error {
    margin: 0;
    padding: 12px 16px;
    background: #fdecea;
    border-radius: 5px;
    color: #b32d2e;
    font-size: var(--fs-16);
}

.quote-form__submit { width: 100%; margin-top: 4px; }

/* ----------------------------------------------------------
   3. Productos solicitados
   ---------------------------------------------------------- */
.quote-form__products { display: flex; flex-direction: column; gap: 16px; }
.quote-modal__empty { margin: 0; color: #8e92a6; font-size: var(--fs-16); }

.quote-item {
    display: grid;
    grid-template-columns: 24px 76px 1fr auto;
    align-items: center;
    gap: 14px;
}
.quote-item__remove {
    display: inline-flex;
    width: 22px;
    height: 22px;
    padding: 3px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #0e1946;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.quote-item__remove:hover { background: #f0f2f7; color: #b32d2e; }
.quote-item__remove svg { width: 100%; height: 100%; }

.quote-item__media {
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f6f6;
}
.quote-item__img { width: 100%; height: 100%; object-fit: cover; }

.quote-item__info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.quote-item__name {
    margin: 0;
    color: #0e1946;
    font-weight: var(--fw-heavy);
    font-size: var(--fs-16);
    line-height: 1.3;
}
.quote-item__sku,
.quote-item__opts,
.quote-item__qty {
    margin: 0;
    color: #8e92a6;
    font-size: var(--fs-14);
}
.quote-item__price {
    margin: 0;
    color: #0e1946;
    font-weight: var(--fw-heavy);
    font-size: var(--fs-16);
    white-space: nowrap;
}

/* ----------------------------------------------------------
   4. Confirmación
   ---------------------------------------------------------- */
.quote-modal__view--success {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    padding: 56px 40px;
    border: 2px solid var(--color-blue);
    border-radius: 12px;
}
.quote-modal__success-title {
    margin: 0;
    color: var(--color-blue);
    font-weight: var(--fw-black);
    font-size: var(--fs-32);
    line-height: 1.2;
    text-transform: uppercase;
}
.quote-modal__success-text {
    margin: 0;
    max-width: 420px;
    color: #0e1946;
    font-size: var(--fs-18);
    line-height: 1.5;
}

/* ----------------------------------------------------------
   5. Responsive
   ---------------------------------------------------------- */
@media (max-width: 600px) {
    .quote-modal { padding: 12px; }
    .quote-modal__view { padding: 24px 20px; }
    .quote-modal__title { font-size: var(--fs-20); }
    .quote-form__row { flex-direction: column; gap: 16px; }
    .quote-item { grid-template-columns: 20px 60px 1fr auto; gap: 10px; }
    .quote-item__media { width: 60px; height: 60px; }
    .quote-modal__view--success { padding: 40px 20px; }
    .quote-modal__success-title { font-size: var(--fs-24); }
}
