/* ============================================================
   Vendor Prices
============================================================ */
.mrpaa-vendor-prices {
    margin: 16px 0 20px;
    padding: 0;
}

.mrpaa-vendor-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #1e293b;
}

.mrpaa-vendor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    transition: border-color 0.2s;
}

.mrpaa-vendor-item:hover {
    border-color: #93c5fd;
}

.mrpaa-vendor-cheapest {
    border-color: #22c55e;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.mrpaa-vendor-cheapest:hover {
    border-color: #16a34a;
}

.mrpaa-vendor-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mrpaa-vendor-name {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.mrpaa-badge-cheapest {
    display: inline-block;
    background: #22c55e;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mrpaa-vendor-stock {
    font-size: 12px;
    color: #16a34a;
}

.mrpaa-vendor-stock.out {
    color: #dc2626;
}

.mrpaa-vendor-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mrpaa-vendor-price {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a8a;
}

.mrpaa-vendor-cheapest .mrpaa-vendor-price {
    color: #15803d;
}

.mrpaa-vendor-link {
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    transition: all 0.2s;
}

.mrpaa-vendor-link:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ============================================================
   Import Section
============================================================ */
.mrpaa-import-section {
    margin: 12px 0 20px;
}

.mrpaa-import-btn {
    display: inline-block;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.mrpaa-import-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.mrpaa-import-panel {
    margin-top: 14px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.mrpaa-import-panel h4 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #1e293b;
}

.mrpaa-import-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px;
}

.mrpaa-import-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mrpaa-import-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mrpaa-import-row label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    min-width: 110px;
}

.mrpaa-input-url {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
}

.mrpaa-input-url:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.mrpaa-select-country {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}

.mrpaa-btn-search {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.mrpaa-btn-search:hover {
    background: #1d4ed8;
}

/* ============================================================
   Loading
============================================================ */
.mrpaa-loading {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 14px;
}

.mrpaa-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: mrpaa-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes mrpaa-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Result Card
============================================================ */
.mrpaa-result-card {
    margin-top: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #93c5fd;
    border-radius: 10px;
}

.mrpaa-result-title {
    margin: 0 0 14px;
    font-size: 15px;
    color: #1e3a8a;
    font-weight: 600;
}

.mrpaa-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .mrpaa-result-grid {
        grid-template-columns: 1fr;
    }
}

.mrpaa-result-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    color: #334155;
}

.mrpaa-result-line .mrpaa-label {
    color: #64748b;
}

.mrpaa-result-line .mrpaa-value {
    font-weight: 600;
}

.mrpaa-result-total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 2px solid #3b82f6;
}

.mrpaa-result-total .mrpaa-label,
.mrpaa-result-total .mrpaa-value {
    font-size: 15px;
    font-weight: 700;
    color: #1e3a8a;
}

/* ============================================================
   Delivery Box
============================================================ */
.mrpaa-delivery-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
}

.mrpaa-delivery-icon {
    font-size: 28px;
    line-height: 1;
}

.mrpaa-delivery-box strong {
    display: block;
    margin-bottom: 2px;
    color: #1e3a8a;
    font-size: 13px;
}

.mrpaa-delivery-box span {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.mrpaa-delivery-box small {
    font-size: 12px;
    color: #64748b;
}

/* ============================================================
   Actions
============================================================ */
.mrpaa-result-actions {
    margin-top: 16px;
    text-align: center;
}

.mrpaa-btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.mrpaa-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
    color: #fff;
}

/* ============================================================
   Error / Manual Entry
============================================================ */
.mrpaa-import-error {
    margin-top: 14px;
    padding: 14px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #991b1b;
    font-size: 13px;
}

.mrpaa-import-error p {
    margin: 0 0 10px;
}

.mrpaa-manual-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.mrpaa-input-price {
    width: 100px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
}

/* ============================================================
   Local Vendor Extras
============================================================ */
.mrpaa-vendor-local {
    border-color: #86efac;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.mrpaa-vendor-local:hover {
    border-color: #22c55e;
}

.mrpaa-vendor-city {
    font-size: 12px;
    color: #475569;
    font-weight: 500;
}

.mrpaa-vendor-whatsapp {
    display: inline-block;
    font-size: 12px;
    color: #fff;
    background: #25d366;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.mrpaa-vendor-whatsapp:hover {
    background: #128c7e;
    color: #fff;
}

/* ============================================================
   Vendor Proposal ("Vous vendez ce produit ?")
============================================================ */
.mrpaa-proposal-section {
    margin: 16px 0 20px;
}

.mrpaa-proposal-toggle {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.mrpaa-proposal-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.mrpaa-proposal-panel {
    margin-top: 14px;
    padding: 20px;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    background: #faf5ff;
}

.mrpaa-proposal-panel h4 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #4c1d95;
}

.mrpaa-proposal-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
}

.mrpaa-proposal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mrpaa-proposal-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mrpaa-proposal-row label {
    font-size: 13px;
    font-weight: 600;
    color: #4c1d95;
}

.mrpaa-proposal-row input,
.mrpaa-proposal-row select,
.mrpaa-proposal-row textarea {
    padding: 8px 12px;
    border: 1px solid #c4b5fd;
    border-radius: 6px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

.mrpaa-proposal-row input:focus,
.mrpaa-proposal-row select:focus,
.mrpaa-proposal-row textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.mrpaa-proposal-row-half {
    flex-direction: row;
    gap: 12px;
}

.mrpaa-proposal-row-half > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (max-width: 500px) {
    .mrpaa-proposal-row-half {
        flex-direction: column;
    }
}

.mrpaa-proposal-actions {
    text-align: center;
    margin-top: 4px;
}

.mrpaa-btn-proposal {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.mrpaa-btn-proposal:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.mrpaa-btn-proposal:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mrpaa-proposal-success {
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #15803d;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.mrpaa-proposal-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #991b1b;
    font-size: 13px;
    text-align: center;
}

.mrpaa-delivery-dest {
    font-size: 13px;
    font-weight: 600;
    color: #16a34a;
    white-space: nowrap;
}

/* ============================================================
   Injected Block (JS fallback placement)
============================================================ */
.mrpaa-injected-block {
    margin-top: 20px;
    clear: both;
    width: 100%;
}
