/* ================================================================
   VM Supplier — Public Styles
   ================================================================ */

/* ── Reset & base ─────────────────────────────────────────────── */
#vm-supplier-lookup .vm-wrap *,
#vm-supplier-lookup .vm-wrap *::before,
#vm-supplier-lookup .vm-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#vm-supplier-lookup .vm-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0d1f3c;
    width: 100%;
}

/* ── Search card ──────────────────────────────────────────────── */
#vm-supplier-lookup .vm-search-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 32px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

#vm-supplier-lookup .vm-search-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #0d1f3c;
    margin-bottom: 30px;
}

#vm-supplier-lookup .vm-search-title svg {
    flex-shrink: 0;
    color: #0d1f3c;
}

/* ── Search row ───────────────────────────────────────────────── */
#vm-supplier-lookup .vm-search-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

#vm-supplier-lookup .vm-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}

#vm-supplier-lookup .vm-field label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

#vm-supplier-lookup .vm-field input {
    height: 46px;
    padding: 0 14px;
    font-size: 14px;
    color: #0d1f3c;
    background: #fff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}

#vm-supplier-lookup .vm-field input:focus {
    border-color: #0d1f3c;
    box-shadow: 0 0 0 3px rgba(13, 31, 60, .08);
}

#vm-supplier-lookup .vm-or {
    font-size: 13px;
    color: #94a3b8;
    padding-bottom: 13px;
    flex-shrink: 0;
}

/* ── Buttons ──────────────────────────────────────────────────── */
#vm-supplier-lookup .vm-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 26px;
    background: #005471;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

#vm-supplier-lookup .vm-btn-primary:hover    { background: #1a3560; }
#vm-supplier-lookup .vm-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

#vm-supplier-lookup .vm-btn-outline {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 22px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, background .15s;
    flex-shrink: 0;
}

#vm-supplier-lookup .vm-btn-outline:hover { border-color: #94a3b8; background: #f8fafc; }

/* ── Inline validation error ──────────────────────────────────── */
#vm-supplier-lookup .vm-inline-error {
    margin-top: 10px;
    font-size: 13px;
    color: #dc2626 !important;
    font-weight: 500;
}

/* ── Loading spinner ──────────────────────────────────────────── */
.vm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 0;
    font-size: 15px;
    font-weight: 600;
    color: #0d1f3c;
}

.vm-loader-gif {
    width: 220px;
    height: auto;
    max-width: 100%;
}

/* ── State panels (empty / error) ─────────────────────────────── */
#vm-supplier-lookup .vm-state {
    text-align: center;
    padding: 52px 24px;
    color: #94a3b8;
}

#vm-supplier-lookup .vm-state svg {
    display: block;
    margin: 0 auto 14px;
}

#vm-supplier-lookup .vm-state p {
    font-size: 14px;
    line-height: 1.6;
}

#vm-supplier-lookup .vm-state--empty P    { color: #005471 !important; }
#vm-supplier-lookup .vm-state--empty svg  { color: #94a3b8 !important; }
#vm-supplier-lookup .vm-state--error     { color: #ef4444 !important; }
#vm-supplier-lookup .vm-state--error svg { color: #fca5a5 !important; }

/* ── Result card ──────────────────────────────────────────────── */
#vm-supplier-lookup .vm-result-card {
    background: #fff;
    border: 1.5px solid #1D9E75;
    border-radius: 14px;
    padding: 28px 32px;
    box-shadow: 0 2px 12px rgba(29, 158, 117, .08);
}

/* Header */
#vm-supplier-lookup .vm-result-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

#vm-supplier-lookup .vm-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #e8f4f0;
    color: #0d1f3c;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#vm-supplier-lookup .vm-result-name {
    font-size: 20px;
    font-weight: 700;
    color: #0d1f3c;
    margin-bottom: 8px;
    line-height: 1.3;
}

#vm-supplier-lookup .vm-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #a7f3d0;
}

#vm-supplier-lookup .vm-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 0 0 26px;
}

/* ── Details grid — 2 columns ─────────────────────────────────── */
#vm-supplier-lookup .vm-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 0;
}

#vm-supplier-lookup .vm-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-right: 32px;
}

/* Right column items */
#vm-supplier-lookup .vm-details-grid .vm-detail-item:nth-child(even) {
    padding-right: 0;
    padding-left: 32px;
    border-left: 1px solid #e2e8f0;
}

#vm-supplier-lookup .vm-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #0d1f3c;
}

#vm-supplier-lookup .vm-detail-label {
    display: block;
    font-size: 12px;
    color: #005471;
    font-weight: 700;
    margin-bottom: 3px;
}

#vm-supplier-lookup .vm-detail-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #0d1f3c;
    line-height: 1.4;
    word-break: break-word;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media ( max-width: 640px ) {

    #vm-supplier-lookup .vm-search-card,
    #vm-supplier-lookup .vm-result-card {
        padding: 20px 18px;
    }

    #vm-supplier-lookup .vm-search-row {
        flex-direction: column;
        align-items: stretch;
    }

    #vm-supplier-lookup .vm-field    { min-width: 100%; }
    #vm-supplier-lookup .vm-or       { text-align: center; padding-bottom: 0; }

    #vm-supplier-lookup .vm-btn-primary,
    #vm-supplier-lookup .vm-btn-outline {
        width: 100%;
        justify-content: center;
    }

    #vm-supplier-lookup .vm-details-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #vm-supplier-lookup .vm-detail-item { padding-right: 0; }

    #vm-supplier-lookup .vm-details-grid .vm-detail-item:nth-child(even) {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #e2e8f0;
        padding-top: 18px;
    }
}

/* ── Multiple result cards ────────────────────────────────── */
#vm-supplier-lookup #vm-results-container .vm-result-card {
    margin-bottom: 16px;
}

#vm-supplier-lookup #vm-results-container .vm-result-card:last-child {
    margin-bottom: 0;
}

#vm-supplier-lookup #vm-results-container{
    background: #ffffff;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#vm-supplier-lookup #vm-results-container:empty {
    display: none;
}

/* ── Card header with integrated nav ─────────────────────── */
#vm-supplier-lookup .vm-result-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

#vm-supplier-lookup .vm-result-header-text {
    flex: 1;
}

#vm-supplier-lookup .vm-header-nav {
    margin-left: auto;
    flex-shrink: 0;
}

#vm-supplier-lookup .vm-nav-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

#vm-supplier-lookup .vm-nav-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0d1f3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background .15s, transform .1s;
    flex-shrink: 0;
}

.vm-nav-btn:hover:not(:disabled) {
    background: #1a3560;
    transform: scale( 1.08 );
}

.vm-nav-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

#vm-supplier-lookup .vm-nav-counter {
    font-size: 13px;
    font-weight: 600;
    color: #0d1f3c;
    min-width: 44px;
    text-align: center;
}

#vm-supplier-lookup #vm-api-error-msg{
    color: #ef4444 !important;
}

/* ── Info card ─────────────────────────────────────────────── */
#vm-supplier-lookup .vm-info-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 32px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

#vm-supplier-lookup .vm-info-text {
    font-size: 14px;
    line-height: 1.7;
    color: #374151 !important;
    margin-bottom: 8px;
}

#vm-supplier-lookup .vm-info-text:last-of-type {
    margin-bottom: 12px;
}

#vm-supplier-lookup .vm-info-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #0d1f3c !important;
    margin-bottom: 16px;
}

#vm-supplier-lookup .vm-info-title svg {
    flex-shrink: 0;
    color: #0d1f3c;
}

#vm-supplier-lookup .vm-info-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

#vm-supplier-lookup .vm-info-list li {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 8px;
}

#vm-supplier-lookup .vm-info-list li:last-child {
    margin-bottom: 0;
}

.vm-info-list li strong {
    color: #0d1f3c;
    font-weight: 700;
}

#vm-supplier-lookup .vm-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    color: #0d1f3c !important;
    border-radius: 50%;
    border: 1px solid #0d1f3c;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    font-style: normal;
}