:root { --ngai-brand: #00b5bd; }

/* ── Trigger Button ────────────────────────────────────── */
.ngai-quote-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ngai-brand);
    color: #fff;
    border: none;
    border-radius: var(--ngai-btn-radius, 6px);
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ngai-quote-trigger-btn:hover { filter: brightness(0.92); transform: translateY(-1px); }

/* ── Overlay ───────────────────────────────────────────── */
#ngai-quote-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999999;
    display: none;
    align-items: flex-end;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#ngai-quote-overlay.open { display: flex; }

/* ── Sheet ─────────────────────────────────────────────── */
#ngai-quote-sheet {
    background: #fff;
    width: 100%;
    max-width: 520px;
    border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 94vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: none;
}
#ngai-quote-overlay.open #ngai-quote-sheet {
    transform: translateY(0);
}

.ngai-sheet-handle {
    width: 40px; height: 5px;
    background: #ddd; border-radius: 3px;
    margin: 12px auto 0;
    flex-shrink: 0;
}

/* ── Header ────────────────────────────────────────────── */
.ngai-sheet-header {
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
#ngai-q-img-slot {
    flex-shrink: 0;
}
#ngai-q-img-slot img {
    width: 52px; height: 52px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    display: block;
}
.ngai-q-meta-label {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.6px; color: #aaa;
    text-transform: uppercase;
    margin-bottom: 3px;
}
.ngai-q-prod-name {
    font-size: 15px; font-weight: 700;
    color: #111; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 280px;
}
.ngai-q-location-tag {
    display: none;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    font-size: 13px;
    color: var(--ngai-brand);
    font-weight: 600;
}
.ngai-q-location-tag svg { flex-shrink: 0; }

#ngai-quote-close {
    margin-left: auto;
    flex-shrink: 0;
    background: none; border: none;
    cursor: pointer; padding: 6px;
    color: #999; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
#ngai-quote-close:hover { background: #f0f0f0; color: #555; }

/* ── Form body ─────────────────────────────────────────── */
.ngai-sheet-body { padding: 20px 20px 24px; }

.ngai-field { margin-bottom: 15px; }
.ngai-field label {
    display: block;
    font-size: 12px; font-weight: 700;
    color: #444; margin-bottom: 5px;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.ngai-field input,
.ngai-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #111;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}
.ngai-field input:focus,
.ngai-field textarea:focus {
    outline: none;
    border-color: var(--ngai-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 181, 189, 0.15);
}
.ngai-field textarea { resize: vertical; min-height: 85px; }

.ngai-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ngai-quote-error-msg {
    color: #e53e3e;
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}

#ngai-quote-submit {
    width: 100%;
    padding: 15px;
    background: var(--ngai-brand);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: filter 0.2s;
    -webkit-appearance: none;
}
#ngai-quote-submit:active { filter: brightness(0.9); }
#ngai-quote-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.ngai-privacy {
    font-size: 12px; color: #aaa;
    text-align: center; margin-top: 12px;
    line-height: 1.5;
}

/* ── Success state ─────────────────────────────────────── */
.ngai-quote-success {
    text-align: center;
    padding: 32px 24px 40px;
}
.ngai-check {
    width: 64px; height: 64px;
    background: rgba(0, 181, 189, 0.12);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.ngai-check svg { width: 32px; height: 32px; color: var(--ngai-brand); }
.ngai-quote-success h3 { margin: 0 0 8px; font-size: 22px; color: #111; }
.ngai-quote-success p { margin: 0; font-size: 15px; color: #666; line-height: 1.6; }

/* ── Desktop centering ─────────────────────────────────── */
@media (min-width: 540px) {
    #ngai-quote-overlay { align-items: center; }
    #ngai-quote-sheet {
        border-radius: 16px;
        max-height: 90vh;
        box-shadow: 0 25px 60px rgba(0,0,0,0.2);
        animation: ngaiSheetIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes ngaiSheetIn {
        from { opacity: 0; transform: scale(0.95) translateY(20px); }
        to   { opacity: 1; transform: scale(1)    translateY(0);    }
    }
    #ngai-quote-overlay.open #ngai-quote-sheet { transform: none; }
    .ngai-sheet-handle { display: none; }
    .ngai-q-prod-name { max-width: 360px; }
}

/* ── Mobile tweaks ─────────────────────────────────────── */
@media (max-width: 480px) {
    .ngai-field-row { grid-template-columns: 1fr; gap: 0; }
    .ngai-q-prod-name { max-width: 200px; }
}
