/**
 * vBuy KYC Document Upload Styles — Compact Grid
 *
 * Dark-themed styling for the merchant KYC document upload page.
 * Uses a 2-column grid for compact document cards with a draft/submit workflow.
 *
 * IMPORTANT: The theme has a global nuclear reset:
 *   body:not(.vbuy-wcfm-dashboard) * { margin: 0 !important; padding: 0 !important; }
 * ALL margin/padding values MUST use !important with body.vbuy-pending-merchant prefix.
 *
 * @package VBuy_Core
 * @since   1.7.0
 */

/* ============================================================
   PENDING MERCHANT — Hide sidebar, full-width content
   ============================================================ */
body.vbuy-pending-merchant .woocommerce-MyAccount-navigation {
    display: none !important;
}

body.vbuy-pending-merchant .woocommerce-MyAccount-content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    flex: 1 1 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.vbuy-pending-merchant .woocommerce-account .woocommerce {
    display: block !important;
}


/* ============================================================
   KYC WRAPPER
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0 60px 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}


/* ============================================================
   TOP BAR
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 0 36px 0 !important;
    padding: 0 0 20px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-topbar__title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    letter-spacing: -0.02em !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-topbar__logout {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    padding: 8px 16px !important;
    margin: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

body.vbuy-pending-merchant .vbuy-kyc-topbar__logout:hover {
    color: #ff5252 !important;
    border-color: rgba(255, 82, 82, 0.2) !important;
    background: rgba(255, 82, 82, 0.05) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-topbar__logout svg {
    margin: 0 !important;
    padding: 0 !important;
}


/* ============================================================
   WELCOME LETTER
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-letter {
    background: rgba(0, 212, 170, 0.03) !important;
    border: 1px solid rgba(0, 212, 170, 0.12) !important;
    border-radius: 14px !important;
    padding: 36px 40px !important;
    margin: 0 0 40px 0 !important;
    line-height: 1.8 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-letter p {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 15px !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    line-height: 1.8 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-letter .vbuy-kyc-greeting {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-letter .vbuy-kyc-regards {
    margin: 24px 0 0 0 !important;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.45) !important;
    font-style: italic !important;
    font-size: 14px !important;
}


/* ============================================================
   UPLOAD HEADER
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-header {
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-header h2 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    letter-spacing: -0.02em !important;
}

body.vbuy-pending-merchant .vbuy-kyc-meta {
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-meta strong {
    color: #00d4aa !important;
    font-weight: 600 !important;
}


/* ============================================================
   PROGRESS BAR
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-progress {
    margin: 0 0 32px 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-progress__bar {
    height: 5px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-progress__fill {
    height: 100% !important;
    background: linear-gradient(90deg, #00d4aa, #00b894) !important;
    border-radius: 3px !important;
    transition: width 0.5s ease !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-progress__label {
    font-size: 12.5px !important;
    color: rgba(255, 255, 255, 0.35) !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* ============================================================
   SECTION HEADERS
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-section {
    margin: 0 0 40px 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-section__title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    margin: 0 0 20px 0 !important;
    padding: 0 0 14px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-section__title svg {
    color: #00d4aa !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-section__desc {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 13.5px !important;
    margin: -8px 0 20px 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}


/* ============================================================
   2-COLUMN GRID
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 640px) {
    body.vbuy-pending-merchant .vbuy-kyc-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ============================================================
   COMPACT DOCUMENT CARDS
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    padding: 20px 22px !important;
    margin: 0 !important;
    transition: border-color 0.2s ease, background 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card:hover {
    border-color: rgba(0, 212, 170, 0.12) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card[data-status="approved"] {
    border-color: rgba(0, 212, 170, 0.2) !important;
    background: rgba(0, 212, 170, 0.02) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card[data-status="draft"] {
    border-color: rgba(100, 149, 237, 0.2) !important;
    background: rgba(100, 149, 237, 0.02) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card[data-status="rejected"] {
    border-color: rgba(255, 82, 82, 0.2) !important;
    background: rgba(255, 82, 82, 0.02) !important;
}


/* ── Card Head (icon + badge) ── */
body.vbuy-pending-merchant .vbuy-kyc-card__head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card__icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(0, 212, 170, 0.07) !important;
    border-radius: 8px !important;
    color: #00d4aa !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 8px !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card__icon svg {
    margin: 0 !important;
    padding: 0 !important;
}


/* ── Card Title ── */
body.vbuy-pending-merchant .vbuy-kyc-card__title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}


/* ============================================================
   BADGES
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 10px !important;
    margin: 0 !important;
    border-radius: 16px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    letter-spacing: 0.02em !important;
}

body.vbuy-pending-merchant .vbuy-kyc-badge--required {
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.3) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-badge--draft {
    background: rgba(100, 149, 237, 0.1) !important;
    color: #6495ed !important;
}

body.vbuy-pending-merchant .vbuy-kyc-badge--pending {
    background: rgba(255, 193, 7, 0.1) !important;
    color: #ffc107 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-badge--approved {
    background: rgba(0, 212, 170, 0.1) !important;
    color: #00d4aa !important;
}

body.vbuy-pending-merchant .vbuy-kyc-badge--rejected {
    background: rgba(255, 82, 82, 0.1) !important;
    color: #ff5252 !important;
}


/* ============================================================
   FILE INFO (uploaded file details + remove button)
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-card__file {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 8px 0 !important;
    padding: 8px 12px !important;
    background: rgba(255, 255, 255, 0.025) !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    flex-wrap: wrap !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card__filename {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 200px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card__filesize {
    margin: 0 !important;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.35) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card__remove {
    margin: 0 0 0 auto !important;
    padding: 4px 8px !important;
    background: rgba(255, 82, 82, 0.08) !important;
    border: 1px solid rgba(255, 82, 82, 0.15) !important;
    border-radius: 4px !important;
    color: #ff5252 !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    line-height: 1 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card__remove:hover {
    background: rgba(255, 82, 82, 0.15) !important;
    border-color: rgba(255, 82, 82, 0.3) !important;
}


/* ============================================================
   REJECTION REASON
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-card__rejection {
    margin: 0 0 8px 0 !important;
    padding: 10px 14px !important;
    background: rgba(255, 82, 82, 0.04) !important;
    border: 1px solid rgba(255, 82, 82, 0.1) !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    line-height: 1.45 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-card__rejection strong {
    color: #ff5252 !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* ============================================================
   COMPACT DROPZONE
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-card__upload {
    margin: auto 0 0 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-dropzone {
    position: relative !important;
    border: 2px dashed rgba(255, 255, 255, 0.07) !important;
    border-radius: 8px !important;
    padding: 20px 16px !important;
    margin: 0 !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, background 0.2s ease !important;
}

body.vbuy-pending-merchant .vbuy-kyc-dropzone:hover,
body.vbuy-pending-merchant .vbuy-kyc-dropzone--active {
    border-color: #00d4aa !important;
    background: rgba(0, 212, 170, 0.03) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-dropzone__input {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-dropzone__content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-dropzone__content svg {
    color: rgba(255, 255, 255, 0.12) !important;
    transition: color 0.2s ease !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-dropzone:hover .vbuy-kyc-dropzone__content svg {
    color: #00d4aa !important;
}

body.vbuy-pending-merchant .vbuy-kyc-dropzone__content span {
    font-size: 12.5px !important;
    color: rgba(255, 255, 255, 0.28) !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-dropzone__progress {
    padding: 8px 0 !important;
    margin: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-dropzone__progress-bar {
    height: 3px !important;
    background: linear-gradient(90deg, #00d4aa, #00b894) !important;
    border-radius: 2px !important;
    transition: width 0.15s linear !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* ============================================================
   SUBMIT AREA
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-submit-area {
    text-align: center !important;
    margin: 16px 0 0 0 !important;
    padding: 32px 0 0 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-submit-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 14px 36px !important;
    margin: 0 0 12px 0 !important;
    background: linear-gradient(135deg, #00d4aa, #00b894) !important;
    color: #0a0f1a !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    letter-spacing: 0.01em !important;
}

body.vbuy-pending-merchant .vbuy-kyc-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.25) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-submit-btn:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}

body.vbuy-pending-merchant .vbuy-kyc-submit-btn svg {
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-submit-hint {
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.35) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Submitted success message ── */
body.vbuy-pending-merchant .vbuy-kyc-submitted-msg {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 20px 28px !important;
    margin: 0 !important;
    background: rgba(0, 212, 170, 0.05) !important;
    border: 1px solid rgba(0, 212, 170, 0.15) !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 14.5px !important;
    line-height: 1.6 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-submitted-msg svg {
    color: #00d4aa !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-submitted-msg span {
    margin: 0 !important;
    padding: 0 !important;
}


/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
body.vbuy-pending-merchant .vbuy-kyc-messages {
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    max-width: 400px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vbuy-pending-merchant .vbuy-kyc-msg {
    padding: 14px 22px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    animation: vbuyKycFadeIn 0.3s ease !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(8px) !important;
}

body.vbuy-pending-merchant .vbuy-kyc-msg--success {
    background: rgba(0, 212, 170, 0.15) !important;
    border: 1px solid rgba(0, 212, 170, 0.3) !important;
    color: #00d4aa !important;
}

body.vbuy-pending-merchant .vbuy-kyc-msg--error {
    background: rgba(255, 82, 82, 0.15) !important;
    border: 1px solid rgba(255, 82, 82, 0.3) !important;
    color: #ff5252 !important;
}

@keyframes vbuyKycFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    body.vbuy-pending-merchant .vbuy-kyc-wrapper {
        padding: 0 0 32px 0 !important;
    }

    body.vbuy-pending-merchant .vbuy-kyc-letter {
        padding: 24px 20px !important;
    }

    body.vbuy-pending-merchant .vbuy-kyc-topbar {
        margin: 0 0 24px 0 !important;
        padding: 0 0 16px 0 !important;
    }

    body.vbuy-pending-merchant .vbuy-kyc-topbar__title {
        font-size: 1.2rem !important;
    }

    body.vbuy-pending-merchant .vbuy-kyc-card {
        padding: 16px 18px !important;
    }

    body.vbuy-pending-merchant .vbuy-kyc-card__filename {
        max-width: 140px !important;
    }

    body.vbuy-pending-merchant .vbuy-kyc-messages {
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
    }

    body.vbuy-pending-merchant .vbuy-kyc-dropzone {
        padding: 16px 12px !important;
    }
}
