/* ============================================================
   B2B Wholesale Manager — Registration & Front-end Styles
   Author: Subhendu Pan
   ============================================================ */

/* ----------------------------------------------------------
   SVG icon base
---------------------------------------------------------- */
.b2b-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    line-height: 1;
}
.b2b-label-icon {
    margin-right: 4px;
    opacity: 0.65;
    position: relative;
    top: -1px;
}
.b2b-section-icon {
    margin-right: 6px;
    color: #2271b1;
}
.b2b-notice-icon {
    margin-right: 6px;
    color: #f5a623;
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   Account type selector
---------------------------------------------------------- */
.b2b-account-type-wrap {
    margin: 0 0 24px;
}
.b2b-account-type-label {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 15px;
}
.b2b-type-option {
    display: inline-flex;
    margin-right: 12px;
    cursor: pointer;
}
.b2b-type-option input[type="radio"] {
    display: none;
}
.b2b-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    min-width: 160px;
    text-align: center;
    gap: 6px;
}
.b2b-type-option input:checked + .b2b-type-card {
    border-color: #2271b1;
    background: #f0f6ff;
    box-shadow: 0 0 0 3px rgba(34,113,177,0.15);
}
.b2b-type-card:hover {
    border-color: #2271b1;
}
.b2b-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f0f4f8;
    color: #2271b1;
    margin-bottom: 2px;
    transition: background 0.2s;
}
.b2b-type-option input:checked + .b2b-type-card .b2b-type-icon {
    background: #dbeafe;
}
.b2b-type-card strong { font-size: 14px; }
.b2b-type-card small  { font-size: 12px; color: #666; }

/* ----------------------------------------------------------
   B2B extra fields panel
---------------------------------------------------------- */
#b2b-extra-fields {
    background: #f8faff;
    border: 1px solid #d0e4f5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.b2b-section-title {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 15px;
    color: #2271b1;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d0e4f5;
}
.b2b-hint {
    display: block;
    font-size: 11px;
    color: #888;
    font-weight: 400;
    margin-top: 2px;
}

/* ----------------------------------------------------------
   GST validation
---------------------------------------------------------- */
.b2b-gst-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.b2b-gst-wrap input {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-right: 40px !important;
}
.b2b-gst-status {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.b2b-gst-status .b2b-icon--check-circle { color: #00a854; }
.b2b-gst-status .b2b-icon--x-circle     { color: #d9534f; }
.b2b-gst-status .b2b-icon--loader       {
    color: #999;
    animation: b2b-spin 0.8s linear infinite;
}
@keyframes b2b-spin {
    to { transform: rotate(360deg); }
}
.b2b-gst-msg {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-top: 5px;
}
.b2b-gst-msg.valid   { color: #00a854; }
.b2b-gst-msg.invalid { color: #d9534f; }
.b2b-gst-msg .b2b-icon { flex-shrink: 0; }

/* ----------------------------------------------------------
   File upload
---------------------------------------------------------- */
.b2b-file-input { display: none; }
.b2b-file-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 10px;
    transition: background 0.2s;
}
.b2b-file-label:hover { background: #135e96; }
.b2b-file-name { font-size: 12px; color: #666; }

/* ----------------------------------------------------------
   Approval notice
---------------------------------------------------------- */
.b2b-approval-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fff8e1;
    border-left: 4px solid #f5a623;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    margin-top: 12px;
    line-height: 1.5;
}

/* ----------------------------------------------------------
   Google sign-in button
---------------------------------------------------------- */
.b2b-google-login-wrap {
    margin: 20px 0;
    text-align: center;
}
.b2b-divider {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    color: #999;
    font-size: 13px;
}
.b2b-divider::before,
.b2b-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}
.b2b-divider span { padding: 0 12px; }
.b2b-google-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 24px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.b2b-google-btn .b2b-icon { flex-shrink: 0; }
.b2b-google-btn:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    color: #333;
}

/* ----------------------------------------------------------
   B2B price badge (product/shop pages)
---------------------------------------------------------- */
.b2b-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.b2b-discount-badge .b2b-icon { color: #2e7d32; }
.b2b-wholesale-price { color: #2e7d32; font-weight: 700; }

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */
@media (max-width: 600px) {
    .b2b-type-option { margin-right: 6px; }
    .b2b-type-card { min-width: 130px; padding: 12px 14px; }
}

/* ============================================================
   Verification Pending Banner
   ============================================================ */

.b2b-pending-banner {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #f59e0b;
    border-left: 5px solid #f59e0b;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 0 0 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(245,158,11,0.12);
}

/* Subtle background watermark */
.b2b-pending-banner::before {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(245,158,11,0.08);
    pointer-events: none;
}

/* Rejected variant */
.b2b-pending-banner--rejected {
    background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
    border-color: #ef4444;
    border-left-color: #ef4444;
    box-shadow: 0 4px 20px rgba(239,68,68,0.12);
}
.b2b-pending-banner--rejected::before {
    background: rgba(239,68,68,0.07);
}

/* Icon */
.b2b-pending-banner__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(245,158,11,0.15);
    color: #d97706;
    flex-shrink: 0;
}
.b2b-pending-banner--rejected .b2b-pending-banner__icon {
    background: rgba(239,68,68,0.12);
    color: #dc2626;
}

/* Body */
.b2b-pending-banner__body {
    flex: 1;
    min-width: 0;
}

/* Title */
.b2b-pending-banner__title {
    margin: 0 0 8px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #92400e !important;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}
.b2b-pending-banner--rejected .b2b-pending-banner__title {
    color: #991b1b !important;
}

/* Pulse dot */
.b2b-pending-pulse {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    flex-shrink: 0;
    animation: b2b-pulse 2s ease-in-out infinite;
}
@keyframes b2b-pulse {
    0%, 100% { opacity: 1;   transform: scale(1);   box-shadow: 0 0 0 0 rgba(245,158,11,.5); }
    50%       { opacity: 0.8; transform: scale(1.1); box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}

/* Description text */
.b2b-pending-banner__text {
    margin: 0 0 16px !important;
    color: #78350f;
    font-size: 14px;
    line-height: 1.6;
}
.b2b-pending-banner--rejected .b2b-pending-banner__text {
    color: #7f1d1d;
}

/* Steps tracker */
.b2b-pending-steps {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}
.b2b-pending-steps li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #a16207;
    opacity: 0.5;
}
.b2b-pending-steps li.done {
    opacity: 1;
    color: #15803d;
}
.b2b-pending-steps li.done .b2b-icon {
    color: #16a34a;
}
.b2b-pending-steps li.active {
    opacity: 1;
    color: #92400e;
    font-weight: 600;
}
.b2b-pending-steps li.active .b2b-icon--loader {
    animation: b2b-spin 1s linear infinite;
    color: #d97706;
}

/* PENDING badge */
.b2b-pending-banner__badge {
    position: absolute;
    top: 16px;
    right: 16px;
}
.b2b-pending-banner__badge span {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 600px) {
    .b2b-pending-banner {
        flex-direction: column;
        gap: 14px;
        padding: 18px;
    }
    .b2b-pending-banner__badge {
        position: static;
        margin-top: -8px;
    }
    .b2b-pending-steps {
        flex-direction: column;
        gap: 8px;
    }
}
