/* =============================================================
   ccc-vendor.css
   Styles for all vendor-facing pages.
   Depends on: ccc-variables.css (loaded before this file).
   ============================================================= */


/* ── KYC Form Structure ─────────────────────────────────────── */

.vv-kyc-section {
  padding: var(--space-xl) 0 var(--space-2xl);
  background-color: var(--bg-page);
}

.vv-kyc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  animation: kcFadeUp 0.38s ease both;
}

.vv-kyc-detail-title {
  font-size: var(--font-size-2xl);
  color: var(--text-primary-cst);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
  margin: 0;
}

.vv-kyc-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.vv-kyc-bc-link {
  display: flex;
  align-items: center;
  color: var(--text-muted-cst);
  text-decoration: none;
  transition: var(--tr-fast);
}

.vv-kyc-bc-link:hover {
  color: var(--text-primary-cst);
}

.vv-kyc-bc-sep {
  color: var(--border-default);
  display: flex;
}

.vv-kyc-bc-item {
  font-size: var(--font-size-xs);
  color: var(--text-muted-cst);
}

.vv-kyc-bc-active {
  color: var(--text-secondary-cst);
}

.vv-kyc-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin-bottom: var(--space-lg);
  animation: kcFadeUp 0.38s ease 0.05s both;
}

.vv-kyc-alert-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vv-kyc-alert-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xxs);
}

.vv-kyc-alert-title {
  font-size: var(--font-size-md);
  letter-spacing: var(--letter-spacing-tight);
}

.vv-kyc-alert-title.vv-kyc-alert-approved-color {
  color: var(--status-success);
}

.vv-kyc-alert-title.vv-kyc-alert-pending-color {
  color: var(--status-warning);
}

.vv-kyc-alert-title.vv-kyc-alert-rejected-color {
  color: var(--status-error);
}

.vv-kyc-alert-desc {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-base);
}

.vv-kyc-alert-approved {
  background: var(--status-success-bg);
  border-color: var(--status-success-border);
}
.vv-kyc-alert-approved .vv-kyc-alert-icon {
  background: var(--status-success-icon);
  color: var(--status-success);
}
.vv-kyc-alert-approved .vv-kyc-alert-desc {
  color: var(--status-success);
}

.vv-kyc-alert-pending {
  background: var(--status-warning-bg);
  border-color: var(--status-warning-border);
}
.vv-kyc-alert-pending .vv-kyc-alert-icon {
  background: var(--status-warning-icon);
  color: var(--status-warning);
  margin-top: var(--space-xxs);
}
.vv-kyc-alert-pending .vv-kyc-alert-desc {
  color: var(--status-warning);
}

.vv-kyc-alert-rejected {
  background: var(--status-error-bg);
  border-color: var(--status-error-border);
}
.vv-kyc-alert-rejected .vv-kyc-alert-icon {
  background: var(--status-error-bg);
  color: var(--status-error);
}
.vv-kyc-alert-rejected .vv-kyc-alert-desc {
  color: var(--status-error);
}

.vv-kyc-form {
  animation: kcFadeUp 0.38s ease 0.08s both;
}

.vv-kyc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.vv-kyc-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 100%;
}

.vv-kyc-form-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.vv-kyc-form-card-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.vv-kyc-form-card-title {
  font-size: var(--font-size-md);
  color: var(--text-primary-cst);
  letter-spacing: var(--letter-spacing-tight);
  margin: 0;
}

.vv-kyc-fields {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.vv-kyc-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.vv-kyc-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xxs);
}

.vv-kyc-field-full {
  grid-column: 1 / -1;
}

.vv-kyc-label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-2xs);
  color: var(--text-muted-cst);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  margin: 0px;
}

.vv-kyc-label svg {
  flex-shrink: 0;
}

.vv-kyc-required {
  color: var(--status-error);
  font-size: var(--font-size-xs);
}

.vv-kyc-input {
  width: 100%;
  padding: var(--space-xxs) var(--space-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary-cst);
  font-size: var(--font-size-xs);
  outline: none;
  transition: var(--tr-base);
  appearance: none;
}

.vv-kyc-input[readonly] {
  background: var(--bg-elevated);
  color: var(--text-muted-cst);
  cursor: not-allowed;
}

.vv-kyc-input::placeholder {
  color: var(--text-muted-cst);
  opacity: 0.5;
}

.vv-kyc-input:hover:not(:focus) {
  border-color: var(--border-default);
}

.vv-kyc-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(247, 247, 247, 0.05);
}

.vv-kyc-input-mono {
  letter-spacing: var(--letter-spacing-wider);
  font-size: var(--font-size-xs);
}

.vv-kyc-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: var(--line-height-base);
}

.vv-kyc-info-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  color: var(--text-muted-cst);
  line-height: var(--line-height-base);
  margin-top: var(--space-xs);
}

.vv-kyc-info-note svg {
  flex-shrink: 0;
  margin-top: var(--space-xxs);
  color: var(--text-muted-cst);
}

.vv-kyc-submit-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.vv-kyc-submit-note {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-xs);
  color: var(--text-muted-cst);
  margin: 0;
  line-height: var(--line-height-base);
}

.vv-kyc-submit-note svg {
  flex-shrink: 0;
  margin-top: -4px;
  color: var(--text-muted-cst);
}

@keyframes kcFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ── File Upload + PDF Preview + PDF Modal ──────────────────── */

.vv-kyc-docs-section {
    margin-top: var(--space-lg);
}

.vv-kyc-docs-hint {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-2xs);
    color: var(--text-muted-cst);
    /* margin-bottom: 1.25rem; */
    letter-spacing: var(--letter-spacing-normal);
}

.vv-kyc-docs-hint span {
    display: flex;
    gap: var(--space-xs);
}

.vv-kyc-docs-hint span:last-child {
    display: flex;
    gap: var(--space-xs);
    padding: 0px 0px 0px var(--space-md);
}

.vv-kyc-docs-hint strong {
    color: var(--text-secondary-cst);
    font-family: var(--abc-social-bold), "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.vv-kyc-pdf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.vv-kyc-pdf-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.vv-kyc-file-upload-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.vv-kyc-file-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-2xs);
    font-weight: var(--font-weight-semi);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-secondary-cst);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--tr-fast);
}
.vv-kyc-file-label:hover {
    background: var(--bg-input);
    border-color: var(--border-default);
}

.vv-kyc-file-input {
    display: none;
}

.vv-kyc-file-name {
    font-size: var(--font-size-2xs);
    color: var(--text-muted-cst);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}
.vv-kyc-file-name.vv-has-file {
    color: var(--neutral-deep);
}

[data-state="hidden"] { display: none; }

.vv-plx-file-preview-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}
.vv-plx-file-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xxs);
    width: 76px;
    cursor: pointer;
    text-decoration: none;
}
.vv-plx-file-preview-item:hover .vv-plx-file-preview-img,
.vv-plx-file-preview-item:hover .vv-plx-file-preview-pdf {
    border-color: var(--border-default);
    opacity: 0.85;
}
.vv-plx-file-preview-img {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-subtle);
    display: block;
    background: var(--bg-elevated);
}
.vv-plx-file-preview-pdf {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--status-error-border);
    background: var(--status-error-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xxs);
    color: var(--status-error-light);
    font-size: var(--font-size-2xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
}
.vv-plx-file-preview-name {
    font-size: var(--font-size-2xs);
    color: var(--text-muted-cst);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 76px;
    display: block;
    line-height: var(--line-height-tight);
}
.vv-plx-file-preview-eye {
    margin-left: auto;
    padding: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted-cst);
    opacity: 0.6;
    cursor: pointer;
    transition: var(--tr-fast);
}
.vv-plx-file-preview-wrap:hover .vv-plx-file-preview-eye {
    opacity: 1;
    color: var(--text-inverse-cst);
}

.vv-kyc-pdf-modal {
    position: fixed;
    inset: 0;
    background: var(--overlay-heavy);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.vv-kyc-pdf-modal-hidden {
    display: none !important;
}

.vv-kyc-pdf-modal-inner {
    background: var(--btn-hover-clr);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    width: 90vw;
    max-width: 900px;
    height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.vv-kyc-pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.vv-kyc-pdf-modal-title {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semi);
    color: var(--text-secondary-cst);
    letter-spacing: var(--letter-spacing-normal);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}

.vv-kyc-pdf-modal-close {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    color: var(--text-secondary-cst);
    cursor: pointer;
    padding: var(--space-xxs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tr-fast);
    flex-shrink: 0;
}
.vv-kyc-pdf-modal-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.vv-kyc-pdf-modal-body {
    flex: 1;
    overflow: hidden;
}
.vv-kyc-pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--bg-page);
}


/* ── KYC Edit Page — File Upload Overrides ──────────────────── */

.vv-kyc-edit .vv-kyc-file-upload-wrap {
    gap: var(--space-sm);
    background: var(--bg-surface);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-xs);
    transition: var(--tr-fast);
}
.vv-kyc-edit .vv-kyc-file-upload-wrap:focus-within,
.vv-kyc-edit .vv-kyc-file-upload-wrap:hover {
    border-color: var(--color-primary);
    background: var(--bg-hover);
}

.vv-kyc-edit .vv-kyc-file-label {
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-elevated);
    color: var(--text-primary-cst);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-med);
    border-radius: var(--radius-md);
    border: none;
    text-transform: none;
    letter-spacing: var(--letter-spacing-normal);
}
.vv-kyc-edit .vv-kyc-file-label:hover {
    background: var(--bg-hover);
    border-color: transparent;
}

.vv-kyc-edit .vv-kyc-file-name {
    font-size: var(--font-size-xs);
    color: var(--text-secondary-cst);
    max-width: unset;
    flex: 1;
}
.vv-kyc-edit .vv-kyc-file-name.vv-has-file {
    color: var(--color-primary);
    font-weight: var(--font-weight-med);
}

.vv-kyc-edit .vv-kyc-pdf-preview {
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-primary-bg);
    border: 1px solid var(--color-primary-border);
    color: var(--color-primary);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-med);
    min-height: unset;
    width: fit-content;
}
.vv-kyc-edit .vv-kyc-pdf-preview:hover {
    background: var(--color-primary-bg-hover);
    border-color: var(--color-primary-border-hover);
}


/* ── Field Validation Errors ── */
.vv-field-error {
    color: var(--status-error);
    font-size: var(--font-size-2xs);
    margin-top: var(--space-xxs);
    display: none;
}


/* ── Bank Input Wrapper & Dropdown ── */
.vv-bank-input-wrapper {
    position: relative;
}

.vv-bank-input-wrapper input.vv-kyc-input {
    padding-right: var(--space-xl);
}

.vv-search-arrow {
    position: absolute;
    top: 50%;
    right: var(--space-sm);
    transform: translateY(-50%);
    color: var(--text-muted-cst);
    pointer-events: none;
    transition: var(--tr-fast);
}

.vv-search-arrow.vv-search-arrow-open {
    transform: translateY(-50%) rotate(180deg);
}

#bank_dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-page);
    border: 1px solid var(--neutral-line);
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.vv-bank-dropdown-item {
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--font-size-2xs);
}

.vv-bank-dropdown-item:hover,
.vv-bank-dropdown-item.vv-bank-dropdown-item-hover {
    background: var(--bg-elevated);
}

.vv-bank-no-results {
    padding: var(--space-sm);
    color: var(--text-muted-cst);
}


/* ── File Upload Hint Text ── */
.vv-kyc-file-hint {
    color: var(--text-muted-cst);
    font-size: var(--font-size-2xs);
    margin-top: var(--space-xxs);
    display: block;
}


/* ── kyc_edit PDF Modal ── */
#kyc-pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--overlay-modal);
    backdrop-filter: blur(4px);
}

#kyc-pdf-modal > div {
    background: var(--bg-surface, #1e293b);
    width: 90%;
    max-width: 900px;
    height: 85vh;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-modal);
    border: 1px solid var(--border-color, #334155);
}

#kyc-pdf-modal > div > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border-color, #334155);
}

#kyc-pdf-modal > div > div:first-child h3 {
    margin: 0;
    color: var(--text-primary, #f8fafc);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-med);
}

#kyc-pdf-modal > div > div:first-child button {
    background: none;
    border: none;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    padding: var(--space-xxs);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: var(--tr-fast);
}

#kyc-pdf-modal > div > div:last-child {
    flex: 1;
    background: #000;
    position: relative;
}

#kyc-pdf-modal > div > div:last-child iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
