/* This files contains CSS pertaining to the following

1. Registration process
2. Drafts

*/



  /* ── STEPPER ── */
  .stepper {
    display: flex; align-items: center; gap: 0;
    margin-bottom: 28px;
    background: var(--stepper-bg);
    border: 1px solid var(--stepper-border);
    border-radius: 10px; padding: 14px 20px;
    box-shadow: var(--form-card-shadow);
  }
  .step { display: flex; align-items: center; gap: 8px; }
  .step-num {
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600;
    font-family: 'Syne', sans-serif;
    flex-shrink: 0;
  }
  .step.done .step-num { background: var(--teal); color: var(--charcoal); }
  .step.active .step-num { background: var(--step-active-bg); border: 1.5px solid var(--teal); color: var(--teal); }
  .step.pending .step-num { background: var(--step-pending-bg); border: 1px solid var(--step-pending-border); color: var(--step-pending-color); }
  .step-label { font-size: 12px; }
  .step.done .step-label { color: var(--teal); }
  .step.active .step-label { color: var(--step-active-label); font-weight: 500; }
  .step.pending .step-label { color: var(--muted); }
  .step-line { flex: 1; height: 1px; background: var(--step-line-bg); margin: 0 10px; min-width: 20px; max-width: 50px; }
  .step-line.done { background: var(--teal-border); }

  
  /* ── FORM CARD ── */
  .form-card {
    background: var(--form-card-bg);
    border: 1px solid var(--form-card-border);
    border-radius: 14px;
    box-shadow: var(--form-card-shadow);
    margin-bottom: 20px;

  }
  .form-card-header {
    padding: 18px 24px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    background: var(--form-card-header-bg);
    display: flex; align-items: flex-start; justify-content: space-between;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }
  .form-card-header-left { display: flex; align-items: center; gap: 12px; }
  .section-icon {
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--teal-dim); border: 1px solid var(--teal-border);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .section-icon svg { width: 16px; height: 16px; color: var(--teal); }
  .section-title { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 600; color: var(--section-title-color); }
  .section-desc { font-size: 12px; color: var(--section-desc-color); margin-top: 2px; }
  .form-card-body { padding: 24px; }
  
  .date-proxy {
    position: relative;
  }

  .date-proxy #deliveryDateText {
    padding-right: 42px;
  }

  .date-picker-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--field-input-color);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
  }

  .date-picker-button:hover,
  .date-picker-button:focus-visible {
    background: rgba(49, 131, 161, 0.12);
    outline: none;
  }

  .date-native-picker {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
  }

  /* ── PRODUCT ITEM ── */
  .product-item {
    border: 1px solid var(--product-item-border);
    border-radius: 10px;
    background: var(--product-item-bg);
    margin-bottom: 14px;
    overflow: hidden;
  }
  .product-item-header {
    padding: 12px 16px;
    background: var(--product-header-bg);
    border-bottom: 1px solid var(--product-header-border);
    display: flex; align-items: center; justify-content: space-between;
  }
  .product-item-title { font-size: 12.5px; font-weight: 500; color: var(--product-title-color); }
  .product-item-title span { color: var(--teal); font-weight: 600; }
  .product-item-body { padding: 16px; }

  /* ── STAKEHOLDER SECTIONS ── */
  .stakeholder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .stakeholder-card {
    border: 1px solid var(--stakeholder-card-border);
    border-radius: 10px;
    background: var(--stakeholder-card-bg);
    padding: 16px;
  }
  .stakeholder-title {
    font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
    color: var(--teal); text-transform: uppercase;
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 1px solid rgba(49,131,161,0.1);
  }

  /* ── PROGRESS TABLE ── */
  .progress-table { width: 100%; border-collapse: collapse; }
  .progress-table th {
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em;
    color: var(--progress-th-color); text-transform: uppercase; text-align: left;
    padding: 8px 12px; border-bottom: 1px solid var(--progress-th-border);
  }
  .progress-table td { padding: 10px 12px; border-bottom: 1px solid var(--progress-td-border); }
  .progress-table td { vertical-align: top; }
  .progress-table tr:last-child td { border-bottom: none; }
  .progress-table td input, .progress-table td select {
    height: 34px; font-size: 12.5px;
    background: var(--progress-input-bg);
    border: 1px solid var(--progress-input-border);
    border-radius: 6px; color: var(--progress-input-color);
    padding: 0 10px; outline: none; width: 100%;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.18s;
  }
  .progress-table td textarea {
      width: 100%;
      min-height: 38px;

      background: var(--progress-input-bg);
      border: 1px solid var(--field-input-border);
      border-radius: 8px;

      color: var(--field-input-color);
      font-family: 'DM Sans', sans-serif;
      font-size: 13px;
      line-height: 1.5;

      padding: 10px 12px;
      resize: none;
      overflow: hidden;
  }

  .progress-table td select:focus,
  .progress-table td select:focus-visible,
  .progress-table td textarea:focus,
  .progress-table td textarea:focus-visible {
      outline: none !important;
      border-color: var(--teal-border) !important;
      background: rgba(49,131,161,0.06) !important;
      box-shadow: 0 0 0 3px rgba(49,131,161,0.08) !important;
  }

  .progress-table td input:focus, .progress-table td select:focus { border-color: var(--teal-border); }
  .progress-table td select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238892a4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
    appearance: none; -webkit-appearance: none; cursor: pointer;
    padding-right: 24px;
  }
  .progress-table td select option { background: var(--field-input-bg); }




.upload-delete-btn {
    position: absolute;
    top: 30%;
    right: 16px;
    margin-left: 16px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease;
  }

  .upload-delete-btn svg {
      width: 16px;
      height: 16px;
  }

  .upload-delete-btn:hover {
      background: rgba(220,38,38,.08);
      color: #dc2626;
  }
  .uploaded-file-card.is-uploading .upload-delete-btn {
      opacity: .7;
  }
  .uploaded-file-card.is-uploading {
      cursor: default;
  }
  .uploaded-file-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background: var(--field-input-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    box-sizing: border-box;
    width: 100%;
  }
  .uploaded-file-card:hover { background: var(--teal-dim); }
  .uploaded-file-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
  }
  .uploaded-file-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(49,131,161,0.1);
    color: var(--teal);
    font-weight: 700;
    font-size: 12px;
  }
  .uploaded-file-meta {
    min-width: 0;
    padding-right: 48px;
  }
  .uploaded-file-filename {
    font-weight: 700;
    color: var(--page-title-color);
    font-size: 14px;
    max-width: clamp(800px, 20vw, 220px);
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
  }
  .uploaded-file-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
    max-width: 100%;
    overflow: hidden;
  }


/* Prevent overflow from long filenames / sizes */
.uploaded-file-meta,
.uploaded-file-filename,
.uploaded-file-subline,
.uploaded-file-size {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

  .uploaded-file-status,
  .uploaded-file-size {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .uploaded-file-size {
    color: var(--muted-light);
  }
  .uploaded-file-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  .uploaded-file-card-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
.uploaded-file-card.pending-delete {
    opacity: 0.6;

    background: #f3f4f6;

    border-color: #d1d5db;

    filter: grayscale(100%);

    pointer-events: none;
}
.uploaded-file-card.pending-delete .upload-delete-btn {
    pointer-events: auto;
}
.uploaded-file-card.pending-delete .uploaded-file-subline {
    color: #dc2626;
}

.uploaded-disabled {
    pointer-events: none !important; 
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}


  /* ── COMPETITOR SECTION ── */
  .competitor-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
  .comp-tab {
    padding: 6px 14px; border-radius: 6px;
    font-size: 12px; font-weight: 500;
    border: 1px solid var(--comp-tab-border);
    background: transparent; color: var(--comp-tab-color);
    cursor: pointer; transition: all 0.18s;
  }
  .comp-tab.active { background: var(--teal-dim); border-color: var(--teal-border); color: var(--teal); }


  /* ── FOOTER ACTIONS ── */
  .form-actions {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 0 0;
    border-top: 1px solid var(--form-actions-border);
    margin-top: 8px;
  }

  
.phone-country-wrap {
  position: relative;
  flex: 0 0 120px;   
  max-width: 120px;
  overflow: visible;
}

.phone-country-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  max-height: 280px;
  overflow-y: auto;
  background: #111;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  display: none;
  z-index: 11000;
}

.phone-country-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
}

.phone-country-item:hover {
  background: rgba(255,255,255,.08);
}

.phone-country-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Ensure emoji flags render in Chromium by preferring color emoji fonts */

.phone-country-left span:first-child,
.phone-country-item > .phone-country-left > span:first-child {
  font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", "Twemoji Mozilla", "EmojiOne Color", sans-serif;
  font-size: 16px;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

/* Explicit class for flags to ensure Chromium applies the emoji fallback */
.flag-emoji {
  font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", "Twemoji Mozilla", "EmojiOne Color", sans-serif !important;
  font-size: 16px;
  line-height: 1;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
}


.phone-country-wrap input {
  width: 100% !important; 
  cursor: pointer;
}


.phone-country-dropdown {
  min-width: 280px;
  left: 0;
  right: auto;
}

/* Twemoji flag image sizing */
.flag-emoji img {
  width: 20px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
}

.draft-helper {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}


#progress-tbody input:disabled,
#progress-tbody select:disabled {
  background: #f5f5f5;
  color: var(--muted);
  cursor: not-allowed;
}


.date-picker-button {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--muted, #6b7280);
}

.calendar-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

.date-picker-button:hover {
  color: var(--teal, #0f9e7e);
}

.currency-input {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency-input #estimatedValueText {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 44px;
}

.currency-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  color: var(--field-input-color);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
}

.currency-input.currency-vnd-selected .currency-prefix {
  font-size: 24px;
  font-weight: 500;
}

.currency-select {
  position: relative;
  flex: 0 0 120px;
  max-width: 120px;
}

.currency-button {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--field-input-border);
  background: var(--field-input-bg);
  color: var(--field-input-color);
  padding: 0 8px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
}

.currency-button:hover,
.currency-button:focus-visible {
  border-color: var(--teal-border);
  background: rgba(49,131,161,0.06);
  outline: none;
}

.currency-flag {
  font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", "Twemoji Mozilla", "EmojiOne Color", sans-serif;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.currency-flag img {
  width: 20px;
  height: 14px;
  display: inline-block;
}

.currency-code {
  font-size: 12px;
  font-weight: 600;
}

.currency-caret {
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.currency-dropdown {
  position: fixed;
  width: 260px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--form-card-bg);
  border: 1px solid var(--form-card-border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  display: none;
  z-index: 11000;
}

.currency-dropdown.open { display: block; }

.currency-option {
  width: 100%;
  display: grid;
  grid-template-columns: 24px 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--field-input-color);
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  line-height: 1.2;
}

.currency-option:hover,
.currency-option:focus-visible {
  background: rgba(49,131,161,0.1);
  outline: none;
}

.currency-option-main {
  font-weight: 700;
}

.currency-option-name {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}






  /* ── DRAFT REVIEW ── */
  .draft-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 320px; gap: 16px; color: var(--muted);
  }
  .draft-empty-icon { font-size: 48px; opacity: 0.4; }
  .draft-empty-title { font-family: 'Syne', sans-serif; font-size: 18px; color: var(--page-title-color); }
  .draft-empty-sub { font-size: 13px; color: var(--muted); }
  .draft-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
  .draft-field-group {
    background: var(--form-card-bg); border: 1px solid var(--form-card-border);
    border-radius: 10px; padding: 16px; box-shadow: var(--form-card-shadow);
  }
  .draft-field-group-title {
    font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal);
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 1px solid var(--teal-border);
  }
  .draft-row { display: flex; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
  .draft-row:last-child { margin-bottom: 0; }
  .draft-label { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; flex-shrink: 0; }
  .draft-value { font-size: 13px; color: var(--page-title-color); text-align: right; word-break: break-word; }
  .draft-value.empty { color: var(--muted); font-style: italic; }
  .draft-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
    background: var(--teal-dim); border: 1px solid var(--teal-border); color: var(--teal); font-size: 11px; margin: 1px; }
  .draft-actions { display: flex; gap: 10px; align-items: center; justify-content: space-between;
    padding: 16px 0 0; border-top: 1px solid var(--form-actions-border); }
  .draft-product-card {
    background: var(--product-item-bg); border: 1px solid var(--product-item-border);
    border-radius: 8px; padding: 12px; margin-bottom: 8px;
  }
  .draft-product-num { font-size: 11px; font-weight: 600; color: var(--teal); margin-bottom: 8px; }
