/* --------------------------
   Wrapper & Layout
--------------------------- */
.edb-wrap {
    margin: 30px auto;
    color: #333;
}

/* --------------------------
   Progress Steps
--------------------------- */
.edb-progress-wrapper {
    position: relative;
    margin-bottom: 32px;
}

/* Step bar layout */
.edb-progress {
    display: flex;
    gap: 10px;
}

/* Step items default UI (keeps your pill style!) */
.edb-step-ind {
    flex: 1;
    background: #eef0f4;
    color: #60697b;
    padding: 14px 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid #dde1e8;
    position: relative;
    transition: background 0.3s, color 0.3s, transform 0.3s;
}

/* Active step */
.edb-step-ind.active {
    background: #0073aa;
    border-color: #0073aa;
    color: #ffffff !important;
    transform: scale(1.03);
}

.edb-step-ind.active::before {
    content: ""; /* remove checkmark on active */
}

/* Completed step – minimal styling */
.edb-step-ind.completed {
    color: #1a1a1a;
}

/* Add checkmark */
.edb-step-ind.completed::before {
    content: "✔";
    margin-right: 6px;
    color: #0073aa;
    font-weight: bold;
}

/* --- Animated progress bar --- */
.edb-progress-bar {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e1e4e8;
    border-radius: 4px;
}

.edb-progress-fill {
    width: 0%;
    height: 100%;
    background: #0073aa;
    border-radius: 4px;
    transition: width 0.45s ease;
}

/* Mobile adjustments */
@media (max-width: 700px) {
    .edb-step-ind {
        font-size: 0.9rem;
        padding: 10px;
    }
}



/* --------------------------
   Card
--------------------------- */
.edb-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* --------------------------
   Form Fields
--------------------------- */
.edb-wrap .edb-field {
    margin-bottom: 16px;
    font-size: 1rem;
}

.edb-wrap .edb-field label {
    display: block !important;
    margin-bottom: 6px;
}

.edb-wrap .edb-input {
    padding: 12px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, background-color 0.2s;
}

.edb-wrap .edb-select {
    width: 100% !important;
}

.edb-wrap .edb-row .edb-field {
    display: flex;
    flex-direction: column;
}

.edb-wrap .edb-field .iti {
    display: block !important;
    width: 100% !important;
}

.edb-field .iti input {
    width: 100% !important;
    display: block !important;
}
/* Dropdown styling */
.edb-wrap .edb-input select,
.edb-wrap .edb-input option {
    font-size: 15px;
}

/* Error & Success states */
.edb-wrap .edb-input.error {
    border-color: #e74c3c !important;
    background: #fff5f5;
}

/* .edb-wrap .edb-input.success {
    border-color: #27ae60 !important;
    background: #f7fff8;
} */

.edb-wrap .edb-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
}

/* --------------------------
   Form Rows (2 columns)
--------------------------- */
.edb-row {
    display: flex;
    gap: 30px;
}

.edb-half {
    flex: 1;
}


.edb-upload-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 24px;
    border: 2px dashed #7aa7cc;
    border-radius: 12px;
    background: #f4f9ff;
    color: #0b63c5;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.edb-upload-box:hover {
    background: #e8f2ff;
    border-color: #0b63c5;
}

.edb-upload-box.uploaded {
    background: #f4f9ff;
    border-color: #7aa7cc;
    color: #0b63c5;
}

.edb-upload-text {
    font-size: 15px;
    font-weight: 600;
}

.edb-upload-hint {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}

.edb-upload-error {
    margin-top: 6px;
    font-size: 13px;
    color: #d9534f; /* red */
    font-weight: 500;
    display: none;
}
.edb-file-header {
    display: flex;
    align-items: center;       /* Fix: vertical centering */
    gap: 10px;
    margin-bottom: 10px;
    padding: 6px 4px;
}

.edb-filetype-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.edb-file-name-trunc {
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    max-width: calc(100% - 36px); /* leave room for icon & gap */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edb-file-header-row {
    display: flex;
    align-items: center;        /* FULL vertical centering */
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    margin-bottom: 8px;
    padding: 4px 0;
    box-sizing: border-box;
}

.edb-file-header-left {
    display: flex;
    align-items: center;        /* Center icon + name */
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;               /* REQUIRED for ellipsis */
}

.edb-file-header-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.edb-file-header-icon svg {
    width: 100%;
    height: 100%;
    display: block;   
}

.edb-file-header-name {
    font-size: 15px;
    line-height: 1.1;           /* PERFECT vertical balancing */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    flex: 1 1 auto;
    min-width: 0;
    display: block;
}

.edb-file-header-delete {
    display: inline-flex;
    align-items: center;        /* Center delete icon */
    justify-content: center;
    padding: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 6px;
    flex-shrink: 0;
}

.edb-file-header-delete:hover {
    background: #f1f1f1;
}

.edb-file-header-delete svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: #d32f2f;
}

/* Mobile: stack fields */
@media (max-width: 600px) {
    .edb-row {
        flex-direction: column;
    }
}

/* --------------------------
   Buttons
--------------------------- */
.edb-wrap .edb-btn {
    background: #0073aa;
    color: #fff;
    padding: 12px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.25s;
}

.edb-wrap .edb-btn:hover {
    background: #005f8a;
}

.edb-wrap .edb-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.edb-wrap .edb-right {
    float: right;
}

/* Back Button */
.edb-btn.edb-back {
    background: #fff !important;
    border: 1px solid #D5D7DA;
    color: #414651;
}

.edb-btn.edb-back:hover {
    background: #777 !important;
    color: #f4eded;
}

/* --------------------------
   Spinner
--------------------------- */
.edb-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: edb-spin 0.8s linear infinite;
}
#edb-spinner2{
    font-size: 1rem;
    font-weight: 600;
}
@keyframes edb-spin {
    to { transform: rotate(360deg); }
}



/* --------------------------
   Success Screen
--------------------------- */
#edb-success h3 {
    font-size: 22px;
    margin-bottom: 5px;
}

#edb-success p {
    font-size: 16px;
    color: #444;
}

/* --------------------------
   intl-tel-input override
--------------------------- */
.iti {
    width: 100%;
}

.iti--allow-dropdown .iti__selected-flag {
    padding: 8px;
}

.iti__country-list {
    z-index: 9999;
}

.edb-column-wrapper {
  display: flex;
  width: 100%;
  gap: 3%;
  box-sizing: border-box;
}

.edb-column-left {
    width: 50%;
    padding: 2%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.edb-column-right {
  width: 50%;
  padding-top: 2%;
}

.instructions-head {
    font-weight: 500;
}

/* FACE WRAPPER */
.edb-face-wrapper {
  display: flex;
  width: 100%;
  gap: 3%;
  box-sizing: border-box;
}

/* ---- Left Column ---- */
.edb-face-left {
    width: 48%;
    padding: 2%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.edb-face-left h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5vw;
    color: #1a1a1a;
}

/* ---- Instruction Items ---- */
.edb-instruction {
  display: flex;
    align-items: flex-start;
    margin-bottom: 1.8vw;
}

.edb-instruction-icon {
    font-size: 2vw;
    margin-right: 1vw;
    line-height: 1;
}

/* Text block */
.edb-instruction-text {
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    padding-left: 10px;;
}

.edb-instruction-text-title {
    font-size: 1.25vw;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3vw;
}

.edb-instruction-text-desc {
    font-size: 0.95vw;
    color: #666;
    line-height: 1.4;
    max-width: 90%;
}

.edb-instruction h4 {
  margin: 0;
  font-size: 1.05rem;
}

.edb-instruction p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #555;
}

.edb-icn {
  font-size: 1.8rem;
  width: 10%;
}

/* ---- Right Column ---- */
.edb-face-right {
  width: 38%;
  text-align: center;
}

/* ---- Camera Preview ---- */
.edb-camera-box {
  width: 100%;
  height: 320px;
  background: #eaf3ff;
  border: 2px solid #d8e6ff;
  border-radius: 14px;
  display: block;
  justify-content: center;
  align-items: center;
  margin-bottom: 3%;
  overflow: hidden;
}

#edb-video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Buttons ---- */
.edb-btn-primary,
.edb-btn-secondary {
  width: 60%;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1rem;
  margin: 1.5% auto;
  display: block;
  cursor: pointer;
  border: none;
}

.edb-btn-primary {
  background: #0b63c5;
  color: #fff;
}

.edb-btn-primary:hover {
  background: #084f9c;
}

.edb-btn-secondary {
  background: #ddd;
  color: #222;
}

.edb-btn-secondary:hover {
  background: #cfcfcf;
}

/* Disabled button style */
.edb-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ---- Spinner ---- */
#edb-video-spinner {
  margin-top: 10px;
  font-weight: bold;
  color: #0b63c5;
}

/* ---- Mobile View ---- */
@media (max-width: 900px) {
    .edb-face-left {
        width: 100%;
        padding: 4% 2%;
        text-align: left;
    }

    .edb-face-left h2 {
        font-size: 5vw;
    }

    .edb-instruction {
        margin-bottom: 4vw;
    }

    .edb-instruction-icon {
        font-size: 5vw;
        margin-right: 3vw;
    }

    .edb-instruction-text-title {
        font-size: 4vw;
    }

    .edb-instruction-text-desc {
        font-size: 3vw;
    }
}

@media (max-width: 480px) {
  .edb-camera-box {
    height: 220px;
  }
  .edb-file-name-trunc { font-size: 13px; }
}

#edb-countdown-timer {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  z-index: 10;
}

.edb-camera-box {
  position: relative; /* IMPORTANT for countdown positioning */
}

.preview-image {
    width:100%;
    border-radius:8px;
    border:1px solid #e6eefb;
}

.edb-hidden {
    display: none;
}

.edb-confirm-block {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    background: #f7f7f7;
    font-size: 1rem;
}

.edb-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.edb-checkbox input {
    margin-right: 10px;
    transform: scale(1.2);
    outline: none !important;
}

.edb-button-primary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Readonly field styling */
.edb-readonly {
    background: #f3f3f3 !important;
    color: #555 !important;
    cursor: not-allowed !important;
    border-color: #d0d0d0 !important;
    opacity: 0.9;
}

.edb-text-sm {
    font-size: 0.9rem;
}
.edb-kyc-accept {
    color: #17aa54;
}
.edb-kyc-reject {
    color: #ae2727;
}
#edb-retry-record {
  margin-top: 12px;
}
.kyc-image-preview {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 12px;
}
.edb-wrap .edb-success-hd {
    color: #0d507a;
    font-size: 1.5rem;
    line-height: 1.8;
    text-align: center;
}
.edb-wrap .edb-success-msg {
    font-size: 1rem;
    text-align: center;
}

.edb-wrap .iti__selected-dial-code {
  font-size: 14px !important;
  font-weight: 500;
}

/* ---------------- PHONE INPUT LAYOUT LOCK ---------------- */
.edb-phone-wrap {
  position: relative;
}

.edb-phone-wrap .iti {
  width: 100%;
}

.edb-phone-wrap input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
}

/* Flag area alignment */
.edb-phone-wrap .iti__flag-container,
.edb-phone-wrap .iti__selected-flag {
  height: 100%;
  display: flex;
  align-items: center;
}

.edb-phone-wrap .iti__selected-dial-code {
  font-size: 12px;   /* ✅ reduces phone code font */
}

/* ---------------- ERROR MESSAGE (DOES NOT SHIFT UI) ---------------- */
.edb-phone-wrap .edb-error {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -18px;
  font-size: 12px;
  color: #e63946;
  line-height: 1;
  white-space: normal;
}

/* ---------------- ERROR BORDER ---------------- */
.edb-input.error {
  border-color: #e63946 !important;
}

/* Prevent jump when error appears */
.edb-field {
  margin-bottom: 26px;
}

#edb-place-country-birth,
#edb-address-current,
#edb-city,
#edb-country {
    position: relative;
    z-index: 1;
}
.photon-wrapper {
    position: relative;
}
.photon-wrapper .edb-input {
    width: 100%;
}
.photon-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #fff;
    border-top: none;
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.15);
    border-radius: 0 0 6px 6px;
    width: 100%;
}
.photon-results div {
    padding: 8px;
    cursor: pointer;
}
.photon-results div:hover {
    background: #eee;
}

.edb-agree-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.edb-agree-wrap span {
  font-size: 1rem;
}

.edb-agree-wrap .edb-error {
  grid-column: 2;      
  margin-top: 5px;
}

.edb-input {
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------
   FORM NAVIGATION BUTTONS
--------------------------- */

/* Standard button row layout */
.edb-row.edb-nav {
    display: flex !important;
    /* justify-content: flex-end !important; */
    justify-content: center !important;
    gap: 12px !important;
    width: 100%;
    margin-top: 25px;
}

/* Button sizing consistency */
.edb-row.edb-nav .edb-btn {
    min-width: 140px;
    text-align: center;
}

/* Back button = secondary visual hierarchy */
.edb-row.edb-nav .edb-back {
    background: #f2f4f7 !important;
    color: #414651 !important;
    border: 1px solid #d7d9dc !important;
}

.edb-row.edb-nav .edb-back:hover {
    background: #e1e5e9 !important;
}

/* Mobile improvements */
@media (max-width: 600px) {
    .edb-row.edb-nav {
        justify-content: space-between !important;
    }
    
    .edb-row.edb-nav .edb-btn {
        flex: 1;
        min-width: auto;
    }
}

.edb-dimmed {
    pointer-events: none;
    opacity: 0.3;
    filter: grayscale(70%);
}

.edb-modal-close-btn {
    margin-top:20px;
    padding:12px 28px;
    background: #fff;
    color: #111111;
    border:none;
    border-radius:6px;
    font-size:16px;
    font-weight:500;
    cursor:pointer;
    border: 1px solid;
}

.edb-success-modal {
    display:none;
    position:fixed;
    left:0; top:0;
    width:100%; height:100%;
    background:rgba(0,0,0,0.6);
    z-index:9999;
    align-items:center;
    justify-content:center;
}

.edb-success-content {
    background:#fff;
    padding:30px;
    border-radius:10px;
    width:90%;
    max-width:600px;
    box-shadow:0 10px 30px rgba(0,0,0,0.3);
    text-align:center;
}

.edb-success-content h3 {
    font-size: 24px;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: #0073aa;
    font-weight: 600;
}

.edb-success-content p {
    font-size: 16px;
    color: #444;
    letter-spacing: 1px;
    font-weight: 500;
}

.edb-success-head {
    border:0;
    height:4px;               
    background:#0073aa;       
    margin:25px auto;        
    border-radius:2px;        
}

#edb-face-placeholder {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
    border-radius: 12px;
    opacity: 1;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

/* ==========================
   RESPONSIVE
========================== */

/* Tablet / small screens */
@media (max-width: 900px) {

    /* Stepper wraps into 2 rows */
    .edb-progress {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .edb-step-ind {
        flex: 1 1 calc(50% - 6px);
        font-size: 0.9rem;
        padding: 12px 10px;
        min-width: 145px;
    }

    .edb-progress-bar {
        bottom: -10px;
    }

    /* Column layouts stack */
    .edb-column-wrapper {
        flex-direction: column;
        gap: 24px;
    }
    .edb-column-left,
    .edb-column-right {
        width: 100%;
        padding: 0;
    }
    .edb-column-right .edb-input {
        width: 80%;
    }

    /* Face wrapper stack */
    .edb-face-wrapper {
        flex-direction: column;
        gap: 24px;
    }
    .edb-face-left,
    .edb-face-right {
        width: 100%;
        padding: 0;
    }

    .edb-wrap .edb-input {
        width: 80%;
    }
}

/* Phones */
@media (max-width: 600px) {

    .edb-card {
        padding: 16px;
        border-radius: 8px;
    }

    .edb-row {
        flex-direction: column;
        gap: 12px;
    }

    label {
        font-size: 0.9rem;
    }

    /* Navigation buttons full-width */
    .edb-row.edb-nav {
        flex-direction: column !important;
        justify-content: center !important;
        gap: 12px !important;
    }
    .edb-row.edb-nav .edb-btn {
        width: 100%;
        min-width: unset;
    }

    /* Camera smaller */
    .edb-camera-box {
        height: 230px;
    }

    .edb-confirm-block {
        font-size: 0.9rem;
        padding: 10px;
    }

    .edb-step-ind {
        font-size: 0.85rem;
        padding: 10px;
    }

    .edb-wrap .edb-input {
        width: 80%;
    }
}

/* Extra narrow phones */
@media (max-width: 400px) {
    .edb-progress {
        flex-direction: column;
    }
    .edb-step-ind {
        flex: 1 1 100%;
        min-width: 0;
    }
    .edb-wrap .edb-input {
        width: 80%;
    }
}