/* ============================================================
   Bafas Quote Request modal overlay
   ============================================================ */

/* Overlay backdrop */
#bqr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.55);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#bqr-overlay.bqr-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
body.bqr-modal-open {
    overflow: hidden;
}

/* Panel */
#bqr-panel {
    position: relative;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,.28);
    width: 100%;
    max-width: 560px;
    padding: 2.5rem 2rem 2rem;
    animation: bqrFadeIn .18s ease;
}
@keyframes bqrFadeIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Close button */
#bqr-close {
    position: absolute;
    top: .75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0 .25rem;
}
#bqr-close:hover { color: #111; }

/* Title */
.bqr-title {
    margin: 0 0 1.25rem;
    font-size: 1.3rem;
    color: #1a1a1a;
}

/* Product header strip */
.bqr-product-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f5f5f5;
    border-radius: 4px;
    padding: .75rem 1rem;
    margin-bottom: 1.25rem;
}
.bqr-product-thumb {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 3px;
}
.bqr-product-meta .bqr-product-name {
    font-weight: 600;
    margin: 0 0 .2rem;
    font-size: .95rem;
}
.bqr-product-meta .bqr-product-sku {
    font-size: .82rem;
    color: #666;
    margin: 0;
}

/* Form layout */
.bqr-row {
    margin-bottom: 1rem;
}
.bqr-row-half {
    display: flex;
    gap: 1rem;
}
.bqr-row-half .bqr-field {
    flex: 1;
}
.bqr-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: .3rem;
    color: #333;
}
.bqr-field label .required {
    color: #c00;
}
.bqr-field input,
.bqr-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: .5rem .65rem;
    font-size: .92rem;
    font-family: inherit;
    color: #1a1a1a;
    transition: border-color .15s;
}
.bqr-field input:focus,
.bqr-field textarea:focus {
    border-color: #0a7abf;
    outline: none;
    box-shadow: 0 0 0 2px rgba(10,122,191,.15);
}
.bqr-field textarea {
    resize: vertical;
    min-height: 90px;
}

/* Actions */
.bqr-actions {
    margin-top: 1.25rem;
}
.bqr-submit-btn {
    background: #0a7abf;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: .65rem 1.75rem;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.bqr-submit-btn:hover:not(:disabled) { background: #085f96; }
.bqr-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Messages */
.bqr-messages { margin-bottom: .75rem; }
.bqr-msg-error {
    background: #fef0f0;
    border: 1px solid #f5c2c2;
    color: #9b1c1c;
    border-radius: 4px;
    padding: .6rem .85rem;
    margin: 0;
    font-size: .9rem;
}

/* Success state */
.bqr-success {
    text-align: center;
    padding: 1rem 0 .5rem;
}
.bqr-success .bqr-title { margin-bottom: .75rem; }
.bqr-success p { color: #333; margin-bottom: 1.5rem; }

/* Loading spinner */
.bqr-loading {
    text-align: center;
    padding: 2.5rem 0;
    color: #666;
    font-size: .95rem;
}

/* Mobile */
@media (max-width: 540px) {
    #bqr-panel { padding: 1.75rem 1.25rem 1.25rem; }
    .bqr-row-half { flex-direction: column; gap: 0; }
}

/* Full-page standalone form styling */
.bafas-quote-page .page-title { margin-bottom: 1.5rem; }
.bafas-quote-page .bafas-quote-form-wrap {
    max-width: 560px;
    margin: 0 auto;
}
