/* =========================================================
   PRODUCT QUOTATION MODAL
========================================================= */

body.pqr-modal-open {
    overflow: hidden;
}

.pqr-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 24px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.pqr-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.pqr-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(7px);
    cursor: default;
}

.pqr-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow:
        0 32px 80px rgba(15, 23, 42, 0.28);
    transform: translateY(24px) scale(0.98);
    transition: transform 0.25s ease;
}

.pqr-modal.is-open .pqr-dialog {
    transform: translateY(0) scale(1);
}

.pqr-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    font-size: 17px;
    cursor: pointer;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.pqr-close:hover {
    border-color: #ef4444;
    background: #fef2f2;
    color: #dc2626;
    transform: rotate(90deg);
}

.pqr-heading {
    padding: 0 54px 22px 0;
}

.pqr-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    color: #0f5cf6;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pqr-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(27px, 4vw, 38px);
    font-weight: 800;
    line-height: 1.12;
}

.pqr-heading p {
    margin: 9px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
}

.pqr-product-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 15px;
    background: #f8fbff;
}

.pqr-product-summary img {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.pqr-product-summary div {
    min-width: 0;
}

.pqr-product-summary span,
.pqr-product-summary small {
    display: block;
}

.pqr-product-summary span {
    margin-bottom: 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.pqr-product-summary strong {
    display: block;
    overflow: hidden;
    color: #0f172a;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pqr-product-summary small {
    margin-top: 3px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
}

.pqr-alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.pqr-alert.is-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.pqr-alert.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.pqr-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px 15px;
}

.pqr-field {
    min-width: 0;
}

.pqr-field-full {
    grid-column: 1 / -1;
}

.pqr-field > label:first-child {
    display: block;
    margin-bottom: 7px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 750;
}

.pqr-field > label span {
    color: #ef4444;
}

.pqr-field > label em {
    color: #94a3b8;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
}

.pqr-field input:not([type="file"]),
.pqr-field select,
.pqr-field textarea {
    width: 100%;
    border: 1px solid #d8dee8;
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.pqr-field input:not([type="file"]),
.pqr-field select {
    height: 46px;
    padding: 0 13px;
}

.pqr-field textarea {
    min-height: 115px;
    padding: 13px;
    resize: vertical;
}

.pqr-field input:focus,
.pqr-field select:focus,
.pqr-field textarea:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11);
}

.pqr-field.has-error input,
.pqr-field.has-error select,
.pqr-field.has-error textarea,
.pqr-field.has-error .pqr-upload {
    border-color: #ef4444;
}

.pqr-error {
    display: block;
    min-height: 15px;
    margin-top: 5px;
    color: #dc2626;
    font-size: 11px;
    line-height: 1.35;
}

.pqr-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-height: 78px;
    padding: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.pqr-upload:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.pqr-upload > i {
    font-size: 21px;
}

.pqr-upload span,
.pqr-upload strong,
.pqr-upload small {
    display: block;
}

.pqr-upload strong {
    font-size: 13px;
}

.pqr-upload small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
}

.pqr-actions {
    display: flex;
    justify-content: flex-end;
    gap: 11px;
    margin-top: 23px;
}

.pqr-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 150px;
    height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.pqr-actions button:hover {
    transform: translateY(-2px);
}

.pqr-actions button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.pqr-whatsapp {
    border: 1px solid #d8dee8;
    background: #ffffff;
    color: #0f172a;
}

.pqr-whatsapp i {
    color: #16a34a;
    font-size: 18px;
}

.pqr-submit {
    border: 1px solid #0f5cf6;
    background: #0f5cf6;
    color: #ffffff;
    box-shadow:
        0 12px 28px rgba(15, 92, 246, 0.22);
}

.pqr-submit:hover {
    box-shadow:
        0 16px 34px rgba(15, 92, 246, 0.3);
}

@media (max-width: 767px) {
    .pqr-modal {
        align-items: end;
        padding: 0;
    }

    .pqr-dialog {
        width: 100%;
        max-height: 92vh;
        padding: 25px 18px 22px;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 22px 22px 0 0;
        transform: translateY(100%);
    }

    .pqr-heading {
        padding-right: 42px;
    }

    .pqr-heading h2 {
        font-size: 27px;
    }

    .pqr-form-grid {
        grid-template-columns: 1fr;
    }

    .pqr-field-full {
        grid-column: auto;
    }

    .pqr-actions {
        position: sticky;
        bottom: -22px;
        z-index: 2;
        margin: 20px -18px -22px;
        padding: 14px 18px;
        border-top: 1px solid #e2e8f0;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
    }

    .pqr-actions button {
        flex: 1;
        min-width: 0;
        padding: 0 13px;
    }
}

@media (max-width: 420px) {
    .pqr-product-summary img {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    .pqr-actions {
        gap: 8px;
    }

    .pqr-actions button {
        font-size: 12px;
    }
}