/* 
  iframe-theme.css 
  Premium UI theme for Contact Iframe based on Figma Design
*/

:root {
  /* Brand Colors */
  --brand-orange: #FF7701;
  --brand-orange-light: #FDA877;
  --brand-blue: #081F6F;
  --brand-blue-border: #001E75;
  /* Backgrounds & Surfaces */
  --bg-main: #F9FAFA;
  --bg-card: #FFFFFF;
  --bg-field: #F7F7F7;
  /* Text Colors */
  --text-primary: #191F10;
  --text-secondary: #676767;
  --text-hint: rgba(68, 68, 68, 0.40);
  --text-dark: #333333;
  /* Borders */
  --border-light: #E7E9E9;
  --border-field: #EEEEEE;
  /* Shadows */
  --shadow-card: 0px 4px 12px rgba(20, 32, 31, 0.02);
  --shadow-header: 0px 1.25px 0px white, 0px 1px 1.5px rgba(44, 54, 53, 0.03);
  font-family:   'Cairo', sans-serif !important;
}

body {
  background-color: var(--bg-main);
  font-family:   'Cairo', sans-serif !important;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
  color: var(--text-dark);
}
button, input, optgroup, select, textarea {
  font-family: 'Roboto' ,'Cairo' !important;
}
  /* Background Decorative SVG */
  .bg-svg-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: auto;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

@media (max-width: 991px) {
    .bg-svg-bottom {
        position: relative;
        bottom: auto;
        margin-top: -10px;
        z-index: 0;
    }
}

.bg-svg-bottom svg {
    width: 100vw;
    height: auto;
    display: block;
}

/* --- Layout Structure --- */
.iframe-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.top-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 32px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-header);
    position: relative;
    z-index: 10;
}

.header-tagline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family:   'Cairo', sans-serif !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .header-tagline .tagline-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-tagline .tagline-text {
        display: flex;
        flex-direction: column;
        line-height: 1.3;
    }

    .header-tagline .tagline-main {
        font-size: 15px;
        font-weight: 700;
        color: var(--text-dark);
    }

        .header-tagline .tagline-main .tagline-highlight {
            color: var(--brand-orange);
            font-style: italic;
            font-weight: 800;
        }

    .header-tagline .tagline-sub {
        font-size: 12px;
        font-weight: 500;
        color: var(--text-secondary);
    }

/* Mobile: tagline becomes a standalone banner */
@media (max-width: 991px) {
    .top-header .header-tagline {
        display: none;
    }

    .header-tagline-mobile {
        display: flex !important;
        align-items: center;
        gap: 10px;
        padding: 10px 20px;
        background: linear-gradient(135deg, #FFF5EB 0%, #FFF 100%);
        border-bottom: 1px solid var(--border-light);
        font-family:   'Cairo', sans-serif !important;
    }

        .header-tagline-mobile .tagline-icon {
            width: 28px;
            height: 28px;
            min-width: 28px;
            display: flex;
        }

        .header-tagline-mobile .tagline-text {
            display: flex;
            flex-direction: column;
            line-height: 1.3;
        }

        .header-tagline-mobile .tagline-main {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-dark);
        }

            .header-tagline-mobile .tagline-main .tagline-highlight {
                color: var(--brand-orange);
                font-style: italic;
                font-weight: 800;
            }

        .header-tagline-mobile .tagline-sub {
            font-size: 11px;
            font-weight: 500;
            color: var(--text-secondary);
        }
}

@media (min-width: 992px) {
    .header-tagline-mobile {
        display: none !important;
    }
}

.lang-toggle {
  font-family: "GE SS Two",  'Cairo', sans-serif !important;
  line-height: normal;
  letter-spacing: -0.16px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
  padding: 8px 12px 8px 16px;
  background: white;
  box-shadow: var(--shadow-header);
  border-radius: 12px;
  border: 1px solid #DCDEDE;
  font-weight: 900;
  font-size: 16px;
  color: #14201F;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  text-decoration: none;
}

    .lang-toggle:hover {
        background: #F7F7F7;
        color: #14201F;
    }

.brand-logo {
    height: 100px;
}

/* Main Content Area - 2 Columns */
.main-grid {
    display: flex;
    flex-direction: row;
    gap: 16px;
    padding: 40px 64px;
    flex-grow: 1;
}

/* Form Panel Column */
.form-panel-container {
    flex: 1;
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    border-radius: 12px;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.form-panel-header {
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

/*.form-panel-header {
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  
 

  color: #191F10;
  text-align: right;
  font-family: "GE SS Two";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;*/ /* 125% */
  /*letter-spacing: -0.32px;
}*/

/* Sidebar Tracker Column */
.tracker-sidebar {
    width: 320px;
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    border-radius: 12px;
    padding: 16px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}
.tracker-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 700;
  font-family: "GE SS Two";
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/*.tracker-header {
  border-bottom: 1px solid var(--border-light);
  color: #191F10;
  text-align: right;
  font-family: "GE SS Two";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;*/ /* 125% */
  /*letter-spacing: -0.32px;
}*/

.tracker-steps {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 16px;
    gap: 40px;
    /* Space between steps */
}

/* Step Item */
.step-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.step-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #A0A0A7;
    transition: color 0.4s ease, font-weight 0.4s ease;
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E6E6E6;
    background: #FFF;
    color: #A0A0A7;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Active Step */
.step-item.active .step-label {
    color: var(--brand-orange);
    font-weight: 700;
}

.step-item.active .step-icon {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: white;
    box-shadow: 0 3px 10px rgba(255, 119, 1, 0.3);
    transform: scale(1.08);
}

/* Completed Step */
.step-item.completed .step-label {
    color: var(--brand-orange-light);
}

.step-item.completed .step-icon {
    background: var(--brand-orange-light);
    border-color: var(--brand-orange-light);
    color: white;
}

/* --- Stepper SVG icon state control ---
   Each step-icon contains 3 children:
   1. .icon-default  (inactive state - outline user/briefcase/file)
   2. .icon-active   (active state  - white outline SVG)
   3. .icon-completed (completed state - check circle SVG)
*/
.step-icon .icon-default {
    display: flex;
}

.step-icon .icon-active {
    display: none;
}

.step-icon .icon-completed {
    display: none;
}

.step-item.active .step-icon .icon-default {
    display: none;
}

.step-item.active .step-icon .icon-active {
    display: flex;
}

.step-item.active .step-icon .icon-completed {
    display: none;
}

.step-item.completed .step-icon .icon-default {
    display: none;
}

.step-item.completed .step-icon .icon-active {
    display: none;
}

.step-item.completed .step-icon .icon-completed {
    display: flex;
}

/* Connecting Lines */
.tracker-lines {
    position: absolute;
    right: 33px;
    /* Center of 36px icon + 16px padding = 16+18 = 34. Let's use roughly center */
    top: 34px;
    bottom: 34px;
    width: 4px;
    background: #E6E6E6;
    z-index: 1;
}

.tracker-line-fill {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: var(--progress, 0%);
    background: linear-gradient(180deg, var(--brand-orange) 0%, var(--brand-orange-light) 100%);
    transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 2px;
}

/* --- Form Controls --- */

/* Generic Flex Row for 2 inputs */
.form-row {
    display: flex;
    gap: 16px;
    width: 100%;
    margin-bottom: 16px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-wrapper {
    position: relative;
    background: var(--bg-field);
    border-radius: 12px;
    min-height: 60px;
    height: 60px;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
    display: flex;
}

    /* Focused Container */
    .input-wrapper:focus-within {
        background: #FFFFFF;
        border-color: var(--brand-orange);
    }

    .input-wrapper.has-value {
        background: #FFFFFF;
        border-color: var(--brand-orange);
    }

    .input-wrapper.readonly {
        background: white;
        border-color: var(--brand-orange);
    }

    /* Error State */
    .input-wrapper.has-error {
        background: #FFFFFF;
        border-color: #dc3545 !important;
    }

        .input-wrapper.has-error .input-icon {
            color: #dc3545;
        }

            .input-wrapper.has-error .input-icon svg path,
            .input-wrapper.has-error .input-icon svg circle,
            .input-wrapper.has-error .input-icon svg rect {
                fill: #dc3545;
                stroke: #dc3545;
            }

        .input-wrapper.has-error .input-label {
            color: #dc3545;
        }

    /* Base input */
    .input-wrapper input,
    .input-wrapper select,
    .input-wrapper textarea {
        width: 100%;
        height: 100%;
        background: transparent;
        border: none;
        outline: none;
        padding: 24px 44px 8px 16px;
        /* Right padding 44px (main icon), Left padding 16px */
        font-size: 15px;
        font-weight: 500;
        color: var(--text-dark);
        font-family:   'Cairo', sans-serif !important;
        appearance: none;
    }
         /* .input-wrapper input[id$="txtNationalId"], .input-wrapper input[id$="txtMobile"], .input-wrapper input[id$="txtEmail"] {
            font-family: 'Roboto' !important;
            font-weight: bold;
          }
        */
    /* For inputs with validation checkmark left icon */
    .input-wrapper.has-validation input,
    .input-wrapper.has-validation select,
    .input-wrapper.has-validation textarea {
        padding-left: 44px;
    }

    .input-wrapper textarea {
        resize: none;
        padding-top: 22px;
    }

    .input-wrapper.input-multiline {
        min-height: 96px;
        height: auto;
        align-items: stretch;
    }

        .input-wrapper.input-multiline textarea {
            min-height: 96px;
            padding-top: 28px;
            padding-bottom: 12px;
            line-height: 1.5;
        }

    /* Hide placeholder when not focused and empty */
    .input-wrapper input:not(:focus):placeholder-shown::placeholder,
    .input-wrapper textarea:not(:focus):placeholder-shown::placeholder {
        color: transparent;
    }

    /* Show placeholder when focused */
    .input-wrapper input:focus::placeholder,
    .input-wrapper textarea:focus::placeholder {
        color: #B5B3BC;
    }

/* Floating Label */
.input-label {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 500;
    color: #A0A0A7;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    transform-origin: right top;
}

/* Active Floating Label */
.input-wrapper input:focus ~ .input-label,
.input-wrapper input:not(:placeholder-shown) ~ .input-label,
.input-wrapper textarea:focus ~ .input-label,
.input-wrapper textarea:not(:placeholder-shown) ~ .input-label,
.input-wrapper select:focus ~ .input-label,
.input-wrapper.has-value .input-label,
.input-wrapper.readonly .input-label {
    top: 14px;
    right: 44px;
    transform: translateY(-50%) scale(0.85);
    color: var(--text-secondary);
}

/* Icon on Right (Main Icon) */
.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #A0A0A7;
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* Icon on Left (Validation Checkmark etc.) */
.input-icon-left {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-orange);
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

    .input-icon svg,
    .input-icon img,
    .input-icon i,
    .input-icon-left svg,
    .input-icon-left img,
    .input-icon-left i {
        width: 18px;
        height: 18px;
        font-size: 18px;
        display: block;
    }

/* Active Icon Color is applied selectively elsewhere, main icon stays gray */

/* Specialized label placement for Readonly items */
.input-wrapper.readonly {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* in rtl flex-start is right */
}

/* Better styling for dropdown list (select) */
.input-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.41 0.589966L6 5.16997L10.59 0.589966L12 1.99997L6 7.99997L0 1.99997L1.41 0.589966Z' fill='%23676767'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 24px center;
    padding-inline-start: 44px;
    padding-inline-end: 44px;
}

[dir="ltr"] .input-wrapper select {
    background-position: right 24px center;
}

/* --- File Upload Areas --- */
.upload-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.upload-title {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 700;
}

    .upload-title span {
        color: var(--brand-orange);
        font-weight: 500;
    }

.upload-cards-row {
    display: flex;
    gap: 16px;
    width: 100%;
}

.upload-card {
    flex: 1;
    min-height: 125px;
    background: #F7F7F7;
    border: 1px solid #EEEEEE;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    justify-content: center;
    /* Center vertically initially */
    padding: 16px;
    gap: 8px;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    text-align: center;
}

    .upload-card:hover {
        border-color: var(--brand-orange);
        background: white;
    }

.upload-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.upload-card input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .upload-icon img {
        width: 100%;
        height: 100%;
    }

.upload-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Upload guidance for OCR quality */
.upload-guide {
    font-size: 11px;
    color: var(--brand-orange);
    font-weight: 500;
    margin-top: 2px;
    padding: 4px 8px;
    background: rgba(255, 119, 1, 0.07);
    border-radius: 6px;
}

/* ID card frame guide overlay */
.id-card-frame {
    position: relative;
    border: 2px dashed rgba(255, 119, 1, 0.3);
    border-radius: 8px;
    padding: 4px;
    width: 100%;
    aspect-ratio: 1.586;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .id-card-frame img[id^="preview_"] {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 6px;
    }

/* Retake photo button */
.btn-retake {
    margin-top: 6px;
    background: none;
    border: 1px solid var(--brand-orange);
    color: var(--brand-orange);
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-family:   'Cairo', sans-serif !important;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

    .btn-retake:hover {
        background: var(--brand-orange);
        color: white;
    }

.upload-subtext {
    font-size: 10px;
    color: #B5B3BC;
}

/* Preview area */
.preview-box {
    display: none;
    /* Hidden by default until JS shows it */
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 8px;
}

    .preview-box img {
        width: 100%;
        max-height: none;
        display: none;
        border-radius: 8px;
        object-fit: contain;
    }

.preview-placeholder {
    display: none;
    /* Keeping it in DOM for JS but no visual placeholder */
}

/* --- Buttons --- */
.btn-actions {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    justify-content: flex-start;
    /* Right align in RTL */
}

.btn-primary-custom {
    width: 225px;
    height: 49px;
    background: var(--brand-blue);
    color: white;
    border: none;
    border-top: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    box-shadow: 0px 0px 0px 1px var(--brand-blue-border), 0px 2px 4px rgba(0, 30, 117, 0.15);
    font-size: 16px;
    font-weight: 500;
    font-family:   'Cairo', sans-serif !important;
    cursor: pointer;
    transition: 0.2s;
}

    .btn-primary-custom:hover {
        filter: brightness(1.1);
    }

.btn-secondary-custom {
    width: 225px;
    height: 49px;
    background: white;
    color: #4B5565;
    border: 1.5px solid #C7C8CC;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    font-family:   'Cairo', sans-serif !important;
    cursor: pointer;
    transition: 0.2s;
}

    .btn-secondary-custom:hover {
        background: #F7F7F7;
    }

/* --- Result Panel --- */
.result-panel {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

/* Required marker */
.required {
    color: var(--brand-orange);
}

/* --- Alert overrides --- */
.alert-warning {
    background: #FFF8F0;
    border-color: #FFE0B2;
    color: #7A5300;
}

.example-wrap {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.example-card {
    text-align: center;
}

    .example-card img {
        max-width: 120px;
        border-radius: 8px;
    }

.example-cap {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* --- Result Panel --- */
.result-screen {
    min-height: 540px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 24px 0;
}

.result-card {
    position: relative;
    width: 100%;
    max-width: 620px;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    /*box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);*/
    padding: 36px 28px 28px;
    text-align: center;
    overflow: hidden;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 31, 111, 0.08);
    color: var(--brand-blue);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}

.result-icon-shell {
    width: 118px;
    height: 118px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, rgba(255, 119, 1, 0.20), rgba(255, 119, 1, 0.06));
    box-shadow: inset 0 0 0 10px rgba(255,255,255,0.55);
}

.result-message {
    max-width: 480px;
    margin: 5px auto;
}
.result-title {
  color: #039754 !important;
  text-align: center !important;
  font-family: "GE SS Two" !important;
  font-size: 20px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 26px !important; /* 130% */
}
    .result-message .result-title {
        display: block;
        color: #2DA44E;
        font-size: 30px;
        font-weight: 800;
        margin-bottom: 10px;
    }

    .result-message .result-subtitle {
        display: block;
        color: var(--text-secondary);
        font-size: 16px;
        line-height: 1.9;
    }

.result-message .result-limit {
  /* display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 18px 0 14px;
        padding: 14px 22px;
        background: #FFFFFF;
        color: var(--text-dark);
        border-radius: 18px;
        font-size: 28px;
        font-weight: 800;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        border: 1.5px solid #E6E6E6;*/
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
 
  padding: 35px 56px;
  align-items: center;
  gap: 2px;
  font-family: Montserrat !important;
  font-size: 35px !important;
  font-style: normal;
  font-weight: 700;
  line-height: 19px;
}

        .result-message .result-limit [data-i18n="result_limit_currency"] {
            color: var(--brand-orange);
            margin-inline-start: 6px;
        }

.result-message .result-note {
  display: block;
  /*color: var(--text-secondary);*/
  font-size:18px !important;
  margin-top: 6px;
  text-align: center;
  font-family: var(--Font-Family, Almarai);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 19px; /* 135.714% */
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

    .result-actions a {
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.result-screen.result-approved .result-card::before {
    display: none;
}

.result-screen.result-submitted .result-icon-shell {
    background: radial-gradient(circle at top, rgba(8, 31, 111, 0.14), rgba(8, 31, 111, 0.05));
}

/* canvas-confetti library handles celebration effects via JS */
.play-celebration .result-limit {
    animation: pulse-limit 1.1s ease-in-out 2;
}

@keyframes pulse-limit {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .play-celebration .result-limit {
        animation: none !important;
    }
}

/* --- Responsive Design --- */
@media (max-width: 991px) {
    .main-grid {
        flex-direction: column;
        /* Tracker on top */
        padding: 24px 16px;
    }

    .tracker-sidebar {
        width: 100%;
        margin-bottom: 16px;
    }

    .tracker-steps {
        flex-direction: row;
        justify-content: space-between;
        padding: 0;
        gap: 0;
    }

    .step-item {
        flex-direction: column;
        margin-bottom: 0;
        text-align: center;
        flex: 1;
        gap: 8px;
    }

    .step-label {
        font-size: 12px;
    }

    /* Horizontal lines for mobile tracker */
    .tracker-lines {
        display: block;
        top: 16px;
        /* center of 36px icon */
        bottom: auto;
        left: 15%;
        right: 15%;
        width: auto;
        height: 4px;
    }

    .tracker-line-fill {
        width: var(--progress, 0%);
        height: 100%;
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .btn-actions {
        flex-direction: inherit;
        width: 100%;
    }

    .btn-primary-custom,
    .btn-secondary-custom {
        width: 100%;
    }

    .upload-cards-row {
        flex-direction: column;
    }
}

/* =========================================
   Select2 Integration Overrides
========================================= */
.input-wrapper .select2-container {
    width: 100% !important;
    height: 100%;
}

.select2-container--default .select2-selection--single {
    height: 60px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 12px !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.41 0.589966L6 5.16997L10.59 0.589966L12 1.99997L6 7.99997L0 1.99997L1.41 0.589966Z' fill='%23676767'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 16px center !important;
}

[dir="ltr"] .select2-container--default .select2-selection--single {
    background-position: right 16px center !important;
}

/* Dropdown always positioned relative to scroll context, not forced */
.input-wrapper .select2-container--open .select2-dropdown--below {
    border-top: none !important;
    border-bottom: 1px solid var(--border-light) !important;
    border-radius: 0 0 12px 12px !important;
    margin-top: 2px;
}

.input-wrapper .select2-container--open .select2-dropdown--above {
    border-bottom: none !important;
    border-top: 1px solid var(--border-light) !important;
    border-radius: 12px 12px 0 0 !important;
    margin-bottom: 2px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: normal !important;
    padding: 24px 44px 8px 16px !important;
    color: var(--text-dark) !important;
    font-weight: 500;
    font-size: 15px;
    text-align: right;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: transparent !important;
    /* Hide to avoid overlap with floating label */
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 8px;
    border: 1px solid var(--border-light);
    padding: 8px 12px;
}

.select2-dropdown {
    border: 1px solid var(--border-light) !important;
    border-radius: 12px !important;
    box-shadow: 0px 8px 24px rgba(20,32,31,0.10);
    overflow: hidden;
    max-height: 260px;
    z-index: 9999;
}

.select2-results__option {
  padding: 10px 16px !important;
  font-family:   'Cairo', sans-serif !important;
  font-size: 14px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--brand-orange) !important;
}

/* Active Floating Label Additions for Select2 */
.input-wrapper.select2-focused .input-label {
    top: 14px;
    right: 44px;
    transform: translateY(-50%) scale(0.85);
    color: var(--text-secondary);
}

.input-wrapper.select2-focused {
    background: #FFFFFF;
    border-color: var(--brand-orange);
}

/* =========================================
   Loader Overlay and Inline Loader
========================================= */
.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(8, 31, 111, 0.15);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: loaderFadeIn 0.4s ease;
}

@keyframes loaderFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Smart Loader Card */
.smart-loader {
    background: linear-gradient(155deg, #ffffff 0%, #f8f9fc 100%);
    padding: 40px 36px 32px;
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(8, 31, 111, 0.16),
        0 0 0 1px rgba(255,255,255,0.5) inset;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 420px;
    width: 92%;
    position: relative;
    overflow: hidden;
    animation: smartLoaderIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Top progress bar */
.smart-loader::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, #FF7701, #FDA877, #B39FE0, #081F6F);
    background-size: 300% 100%;
    animation: smartProgressShift 3s ease-in-out infinite;
    border-radius: 24px 24px 0 0;
}

/* Shimmer effect */
.smart-loader::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,119,1,0.04), transparent);
    animation: rlShimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes smartProgressShift {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 0%; }
    100% { background-position: 0% 0%; }
}

@keyframes smartLoaderIn {
    0%   { opacity: 0; transform: scale(0.88) translateY(16px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Dual-ring spinner */
.smart-loader-spinner {
    width: 64px;
    height: 64px;
    margin-bottom: 6px;
    position: relative;
}

.smart-spinner-svg {
    width: 100%;
    height: 100%;
    animation: rotate-spinner 1.8s linear infinite;
}

    .smart-spinner-svg circle {
        stroke: var(--brand-orange);
        stroke-linecap: round;
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -20;
        animation: dash-spinner 1.5s ease-in-out infinite;
    }

@keyframes rotate-spinner {
    100% { transform: rotate(360deg); }
}

@keyframes dash-spinner {
    0%   { stroke-dasharray: 1, 200;  stroke-dashoffset: 0; }
    50%  { stroke-dasharray: 89, 200; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124; }
}

.smart-loader-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-blue);
  margin: 0;
  font-family:   'Cairo', sans-serif !important;
}

.smart-loader-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    min-height: 22px;
    transition: opacity 0.4s ease;
}

/* Step Indicator */
.smart-loader-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.loader-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: #F5F5F5;
    font-size: 12px;
    font-weight: 600;
    color: #B0B0B0;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    transform: scale(0.95);
    opacity: 0.6;
}

    .loader-step.active {
        background: rgba(255, 119, 1, 0.12);
        color: var(--brand-orange);
        transform: scale(1.05);
        opacity: 1;
        box-shadow: 0 2px 8px rgba(255, 119, 1, 0.15);
    }

    .loader-step.completed {
        background: rgba(0, 180, 80, 0.1);
        color: #00B450;
        transform: scale(1);
        opacity: 1;
    }

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D0D0D0;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.loader-step.active .step-dot {
    background: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(255, 119, 1, 0.2);
    animation: pulse-dot 1.2s ease-in-out infinite;
}

.loader-step.completed .step-dot {
    background: #00B450;
    box-shadow: 0 0 0 2px rgba(0, 180, 80, 0.15);
}

    /* Checkmark icon for completed steps */
    .loader-step.completed .step-dot::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 6px;
        color: white;
        font-weight: bold;
    }

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(255, 119, 1, 0.2);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(255, 119, 1, 0.08);
    }
}

.smart-loader-note {
    font-size: 12px;
    color: #B0B0B0;
    margin: 4px 0 0;
}

@media (max-width: 480px) {
    .smart-loader {
        padding: 28px 20px 24px;
    }

    .smart-loader-steps {
        gap: 4px;
    }

    .loader-step {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* Smart loader is now outside UpdatePanel - no need to block .loader-overlay */

/* #1: Prevent UpdatePanel flicker during async postback */
body.local-loading .iframe-container {
    overflow: hidden;
}

.input-wrapper.is-loading .select2-container {
    opacity: 0.5;
    pointer-events: none;
}

/* Prevent UpdateProgress from showing during local-loading */
body.local-loading [id$="UpdateProgress1"] {
    display: none !important;
}

.input-wrapper.is-loading::after {
    content: "";
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-light);
    border-top-color: var(--brand-orange);
    border-radius: 50%;
    animation: spin-loader 1s linear infinite;
    z-index: 10;
}

@keyframes spin-loader {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* =========================================
   LTR Mode Overrides (English)
========================================= */
[dir="ltr"] body {
    text-align: left;
}

[dir="ltr"] .input-wrapper input,
[dir="ltr"] .input-wrapper select,
[dir="ltr"] .input-wrapper textarea {
    padding-left: 44px;
    /* Icon area */
    padding-right: 16px;
}

[dir="ltr"] .input-wrapper.has-validation input,
[dir="ltr"] .input-wrapper.has-validation select,
[dir="ltr"] .input-wrapper.has-validation textarea {
    padding-right: 44px;
    /* Validation checkmark area */
}

[dir="ltr"] .input-icon {
    right: auto;
    left: 16px;
}

[dir="ltr"] .input-icon-left {
    left: auto;
    right: 16px;
}

[dir="ltr"] .input-label {
    right: auto;
    left: 44px;
    transform-origin: left top;
}

[dir="ltr"] .input-wrapper input:focus ~ .input-label,
[dir="ltr"] .input-wrapper input:not(:placeholder-shown) ~ .input-label,
[dir="ltr"] .input-wrapper textarea:focus ~ .input-label,
[dir="ltr"] .input-wrapper textarea:not(:placeholder-shown) ~ .input-label,
[dir="ltr"] .input-wrapper select:focus ~ .input-label,
[dir="ltr"] .input-wrapper.has-value .input-label,
[dir="ltr"] .input-wrapper.readonly .input-label {
    right: auto;
    left: 44px;
}

/* LTR select arrow override handled above in .input-wrapper select block */

/* Force tel/email alignment based on language direction while keeping number formatting natural */
.input-wrapper input[type="tel"],
.input-wrapper input[type="email"] {
    text-align: right;
    direction: ltr;
}

[dir="ltr"] .input-wrapper input[type="tel"],
[dir="ltr"] .input-wrapper input[type="email"] {
    text-align: left;
}

[dir="ltr"] .tracker-lines {
    right: auto;
    left: 33px;
    /* Align with left-side tracker steps */
}

/* On mobile (horizontal tracker), LTR must keep both left/right */
@media (max-width: 991px) {
    [dir="ltr"] .tracker-lines {
        left: 15%;
        right: 15%;
        top: 16px;
        bottom: auto;
        width: auto;
        height: 4px;
    }
}

/* Fix step item flex box layout for LTR */
[dir="ltr"] .step-item {
    flex-direction: row;
}

/* On mobile, LTR steps should also be column (icon on top, label below) */
@media (max-width: 991px) {
    [dir="ltr"] .step-item {
        flex-direction: column;
        text-align: center;
    }
}

/* Language Button Icons Swap if needed */
[dir="ltr"] .lang-toggle i {
    margin-right: 0;
    margin-left: 4px;
}

/* Local Loading LTR adjustment */
[dir="ltr"] .input-wrapper.is-loading::after {
    left: auto;
    right: 44px;
}

/* Select2 LTR overrides */
[dir="ltr"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 24px 16px 8px 44px !important;
    text-align: left;
}

[dir="ltr"] .input-wrapper.select2-focused .input-label {
    right: auto;
    left: 44px;
}

/* Select2 Arrow: hide default, use CSS background-image arrow instead */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none !important;
}

/* Navbar follows page direction (LTR/RTL) */
@media (max-width: 768px) {
    .result-card {
        padding: 28px 18px 22px;
    }

    .result-message .result-title {
        font-size: 24px;
    }

    .result-message .result-limit {
        font-size: 35px;
        width: 100%;
    }

    .result-actions {
        flex-direction: column;
    }

        .result-actions a {
            width: 100%;
        }
}

/* =========================================
   Step Transition Animations
========================================= */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-60px);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(60px);
    }
}

@keyframes fadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== Panel Step Transitions ===== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-40px);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

.panel-animate-in {
    animation: slideInRight 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.panel-animate-in-reverse {
    animation: slideInLeft 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.panel-animate-out {
    animation: slideOutLeft 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.panel-animate-out-reverse {
    animation: slideOutRight 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* =========================================
   Micro-Animations (Buttons, Inputs)
========================================= */
.btn-primary-custom {
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    position: relative;
    overflow: hidden;
}

    .btn-primary-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0px 0px 0px 1px var(--brand-blue-border), 0px 6px 16px rgba(0, 30, 117, 0.25);
        filter: brightness(1.1);
    }

    .btn-primary-custom:active {
        transform: translateY(0);
        box-shadow: 0px 0px 0px 1px var(--brand-blue-border), 0px 2px 4px rgba(0, 30, 117, 0.15);
    }

.btn-secondary-custom {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .btn-secondary-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
        background: #F7F7F7;
    }

    .btn-secondary-custom:active {
        transform: translateY(0);
    }

/* Input focus glow animation */
@keyframes input-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(255,119,1,0.20);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(255,119,1,0.10);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255,119,1,0);
    }
}

.input-wrapper:focus-within {
    animation: input-glow 1.2s ease-out;
}

/* Step icon bounce on active */
@keyframes stepBounce {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.18);
    }

    60% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

.step-item.active .step-icon {
    animation: stepBounce 0.5s ease-out;
}

/* Upload card hover lift */
.upload-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .upload-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    }

/* =========================================
   Welcome Popup Modal
========================================= */
.welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

    .welcome-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.welcome-modal {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 48px 40px 36px;
    max-width: 520px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 119, 1, 0.08);
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.welcome-overlay.active .welcome-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.welcome-modal::before {
    display: none;
}

.welcome-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF7701, #FDA877);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 119, 1, 0.25);
    animation: pulse-welcome 2s ease-in-out infinite;
}

@keyframes pulse-welcome {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(255,119,1,0.25);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(255,119,1,0.35);
    }
}

.welcome-logo svg {
    width: 40px;
    height: 40px;
}

.welcome-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--brand-blue);
    margin-bottom: 12px;
    line-height: 1.5;
}

.welcome-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 28px;
}

    .welcome-text strong {
        color: var(--brand-orange);
        font-weight: 700;
    }

.welcome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 220px;
  height: 52px;
  background: linear-gradient(135deg, #081F6F, #0C309D);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  font-family:   'Cairo', sans-serif !important;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(8, 31, 111, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .welcome-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 32px rgba(8, 31, 111, 0.30);
    }

    .welcome-btn:active {
        transform: translateY(0);
    }

.welcome-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-orange);
    opacity: 0.4;
}

    .welcome-sparkle:nth-child(1) {
        top: 12%;
        left: 8%;
        animation: sparkle-float 3s ease-in-out infinite;
    }

    .welcome-sparkle:nth-child(2) {
        top: 20%;
        right: 12%;
        animation: sparkle-float 3.5s ease-in-out infinite 0.5s;
        width: 8px;
        height: 8px;
        background: var(--brand-blue);
        opacity: 0.25;
    }

    .welcome-sparkle:nth-child(3) {
        bottom: 18%;
        left: 15%;
        animation: sparkle-float 2.8s ease-in-out infinite 1s;
        width: 5px;
        height: 5px;
        background: #B39FE0;
        opacity: 0.35;
    }

    .welcome-sparkle:nth-child(4) {
        bottom: 25%;
        right: 8%;
        animation: sparkle-float 3.2s ease-in-out infinite 0.3s;
        background: #FDA877;
        opacity: 0.4;
    }

@keyframes sparkle-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.3);
    }
}

/* =========================================
   Result Page - Approved (uses background-1.svg)
========================================= */
.result-screen.result-approved .result-icon-shell {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .result-screen.result-approved .result-icon-shell img {
        width: 140px;
        height: 127px;
    }

/* =========================================
   Result Page - Rejected State (uses background-2.svg)
========================================= */
.result-screen.result-rejected .result-icon-shell {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .result-screen.result-rejected .result-icon-shell img {
        width: 140px;
        height: 127px;
    }

.result-screen.result-rejected .result-title {
    color: #DC3545 !important;
}

/* =========================================
   Result Page - In Processing State (uses background.svg)
========================================= */
.result-screen.result-inprocessing .result-icon-shell {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .result-screen.result-inprocessing .result-icon-shell img {
        width: 140px;
        height: 127px;
    }

.result-screen.result-inprocessing .result-title {
  /*color: var(--brand-blue);*/
  color: var(--brand-orange) !important;
}

/* =========================================
   Enhanced Celebration - Spotlight & Reposition
========================================= */
@keyframes spotlight-in {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }

    60% {
        opacity: 1;
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes limit-glow {
    0%, 100% {
        box-shadow: 0 12px 28px rgba(8, 31, 111, 0.20);
    }

    50% {
        box-shadow: 0 12px 40px rgba(255, 119, 1, 0.35), 0 0 60px rgba(255, 119, 1, 0.15);
    }
}

.play-celebration .result-card {
    animation: spotlight-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/*.play-celebration .result-limit {
    animation: pulse-limit 1.1s ease-in-out 2, limit-glow 2s ease-in-out infinite 1s;
}
*/
/* Form card entrance */
@keyframes card-entrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-panel-container {
    animation: card-entrance 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.tracker-sidebar {
    animation: card-entrance 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* Result screen entrance */
.result-screen {
    animation: fadeScaleIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* =========================================
   Celebration Phase (4 seconds fullscreen)
========================================= */
.celebration-phase {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 480px;
    animation: spotlight-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

    .celebration-phase .result-card {
        max-width: 500px;
        animation: spotlight-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

/* =========================================
   Final Layout (2 columns after celebration)
========================================= */
.final-layout {
    display: flex;
    flex-direction: row-reverse;
    gap: 24px;
    width: 100%;
    animation: fadeSlideUp 0.6s ease forwards;
    align-items: stretch;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card-final {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
}

    .result-card-final .result-card {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        max-width: 100%;
    }

.branches-section {
  flex: 0 0 50%;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 24px;
  animation: fadeSlideUp 0.6s ease 0.15s both;
}

/* Branches Header */
.branches-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.branches-header-icon svg {
    width: 56px;
    height: 56px;
}

.branches-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.branches-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}

/* Branches Tabs */
.branches-tabs {
    display: flex;
    background: #F5F5F5;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.branch-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
}

    .branch-tab.active {
        background: white;
        color: var(--text-primary);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .branch-tab:hover:not(.active) {
        color: var(--text-primary);
    }

/* Branch List */
.branch-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 460px;
    overflow-y: auto;
    padding-left: 4px;
}

    .branch-list-container::-webkit-scrollbar {
        width: 5px;
    }

    .branch-list-container::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 10px;
    }

.branch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .branch-item:hover {
        border-color: var(--brand-orange);
        box-shadow: 0 4px 16px rgba(255, 119, 1, 0.08);
    }

.branch-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.branch-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #F5F7FA;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .branch-item-icon svg {
        width: 20px;
        height: 20px;
        color: var(--brand-orange);
    }

.branch-item-details {
    flex: 1;
}

.branch-item-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

  .branch-item-name   .branch-nearest-badge {
    background: linear-gradient(135deg, #FF7701, #FD8326);
    color: white;
    margin-right: 8px;
    margin-left: 8px;
    flex-shrink: 0; 
    align-items: center;
    justify-content: center;
    padding: 1px 12px;
    border: 1.5px solid var(--brand-orange);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }

[dir="ltr"] .branch-item-name .branch-nearest-badge {
    margin-right: 0;
    margin-left: 8px;
}

.branch-item-address {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.branch-item-hours {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.branch-item-distance {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: 1.5px solid var(--brand-orange);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-orange);
    white-space: nowrap;
    background: rgba(255, 119, 1, 0.04);
}
  .branch-item-distance.branch-distance-nearest {
    border-color: #16a34a;
    color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
  }

  .branch-item-distance.branch-distance-mid {
    border-color: var(--brand-orange);
    color: var(--brand-orange);
    background: rgba(255, 119, 1, 0.04);
  }

  .branch-item-distance.branch-distance-far {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: rgba(8, 31, 111, 0.05);
  }

/* Branch Loading */
.branch-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-secondary);
}

/* Map View */
.branch-map-view {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

/* Responsive */
@media (max-width: 900px) {
    .form-panel-container {
        flex: 1;
        background: var(--bg-card);
        box-shadow: var(--shadow-card);
        border-radius: 12px;
        padding: 24px 8px;
        display: flex;
        flex-direction: column;
        gap: 32px;
    }
    .final-layout {
        flex-direction: column;
    }
    .result-card-final {
        flex: none;
        width: 100%;
        order: -1;
    }    
    .result-card-final .result-card {
            max-width: 100%;
            padding: 80px 5px;
            border-radius: 12px;
        }
        .result-card-final .result-icon-shell {
            width: 70px;
            height: 70px;
            margin-bottom: 10px;
        }

        .result-card-final .result-message .result-title {
            /*font-size: 20px;*/
        }

        .result-card-final .result-message .result-limit {
            /*font-size: 20px;*/
          /*  padding: 10px 16px;*/
        }

        .result-card-final .result-message .result-subtitle {
            font-size: 13px;
        }

          .result-card-final .result-message .result-note {
            text-align: center;
            font-family: var(--Font-Family, Almarai);
            font-size: 14px;
            font-style: normal;
            font-weight: 400;
            line-height: 19px; /* 135.714% */
          }

    .branches-section {
        padding: 14px;
    }

    .result-screen {
        padding: 8px 0;
    }
}

/* #7: Branch Search Styling */
.branch-search-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.branch-search-icon {
    position: absolute;
    left: 14px;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

[dir="ltr"] .branch-search-icon {
    left: auto;
    right: 14px;
}

.branch-search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  font-size: 14px;
  font-family:   'Cairo', sans-serif !important;
  background: #FAFAFA;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .branch-search-input:focus {
        border-color: var(--brand-orange);
        box-shadow: 0 0 0 3px rgba(255, 119, 1, 0.08);
        background: #FFFFFF;
    }

[dir="ltr"] .branch-search-input {
    padding: 12px 44px 12px 16px;
}


/* ===== Branch Map Toolbar ===== */
.branches-map-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 12px 0 12px;
    background: #fff;
}

.branch-locate-btn {
  border: 1px solid var(--brand-orange);
  background: #fff;
  color: var(--brand-orange);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family:   'Cairo', sans-serif !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

    .branch-locate-btn:hover {
        background: var(--brand-orange);
        color: #fff;
        box-shadow: 0 4px 14px rgba(255, 119, 1, 0.18);
    }

/* ===== Branch Active / Hover Sync ===== */
.branch-item.is-active {
    border-color: var(--brand-orange);
    background: #FFF8F2;
    box-shadow: 0 6px 18px rgba(255, 119, 1, 0.12);
}

    .branch-item.is-active .branch-item-icon {
        background: rgba(255, 119, 1, 0.08);
    }

    .branch-item.is-active .branch-item-name {
        color: var(--brand-orange);
    }

/* ===== Map Wrapper ===== */
.branch-map-view {
    background: #fff;
}

#branchesMap {
    width: 100%;
    height: 420px;
    border-radius: 0 0 12px 12px;
}

/* ===== Better mobile spacing ===== */
@media (max-width: 900px) {
    .branches-map-toolbar {
        padding: 10px 10px 0 10px;
    }

    .branch-locate-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    #branchesMap {
        height: 340px;
    }

    .branch-item {
        align-items: flex-start;
        gap: 10px;
    }

    .branch-item-distance {
        margin-top: 8px;
        font-size: 12px;
        padding: 6px 10px;
    }
}
/* =========================================
   Upload Action Buttons (Camera / Gallery)
========================================= */
.upload-card.has-upload-actions input[type="file"] {
    pointer-events: none;
    height: 0;
    width: 0;
    position: absolute;
    overflow: hidden;
    opacity: 0;
}

.upload-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
}

.upload-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1.5px solid #E6E6E6;
  border-radius: 10px;
  background: #FFFFFF;
  font-family:   'Cairo', sans-serif !important;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
}

    .upload-action-btn:hover {
        border-color: var(--brand-orange);
        background: rgba(255, 119, 1, 0.04);
        color: var(--brand-orange);
    }

    .upload-action-btn:active {
        transform: scale(0.97);
    }

    .upload-action-btn .action-icon {
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .upload-action-btn.camera-btn {
        border-color: var(--brand-orange);
        background: rgba(255, 119, 1, 0.06);
        color: var(--brand-orange);
    }

        .upload-action-btn.camera-btn:hover {
            background: var(--brand-orange);
            color: white;
        }

/* Hide camera button on desktop */
@media (min-width: 769px) {
    .upload-action-btn.camera-btn.mobile-only {
        display: none;
    }

    .upload-actions.has-camera .upload-action-btn.gallery-btn {
        flex: 1;
    }
}

/* =========================================
   Camera Modal with Frame Overlay
========================================= */
.camera-modal {
    position: fixed;
    inset: 0;
    z-index: 200000;
    background: #000000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .camera-modal.active {
        opacity: 1;
        visibility: visible;
    }

.camera-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.camera-title {
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family:   'Cairo', sans-serif !important;
}

.camera-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .camera-close:hover {
        background: rgba(255, 255, 255, 0.35);
    }

.camera-body {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .camera-body video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.camera-frame-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-frame-guide {
    width: 85%;
    max-width: 500px;
    aspect-ratio: 1.586;
    border: 3px dashed rgba(255, 119, 1, 0.85);
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.50);
    position: relative;
}

    .camera-frame-guide::after {
        content: '';
        position: absolute;
        inset: -8px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 18px;
        pointer-events: none;
    }

.camera-guide-text {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 600;
    font-family:   'Cairo', sans-serif !important;
    text-align: center;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 14px;
    border-radius: 8px;
}

.camera-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 20px 40px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.camera-gallery-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-family:   'Cairo', sans-serif !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

    .camera-gallery-link:hover {
        background: rgba(255, 255, 255, 0.15);
    }

.camera-capture-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid white;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
    padding: 0;
}

    .camera-capture-btn:hover {
        transform: scale(1.05);
    }

    .camera-capture-btn:active {
        transform: scale(0.95);
    }

.capture-ring {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: white;
    transition: background 0.15s ease;
}

.camera-capture-btn:active .capture-ring {
    background: #FF7701;
}

/* Camera switch button */
.camera-switch-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background 0.2s;
}

    .camera-switch-btn:hover {
        background: rgba(255, 255, 255, 0.35);
    }

/* Compression indicator on upload card */
.compress-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

    .compress-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.compress-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #E6E6E6;
    border-top-color: var(--brand-orange);
    border-radius: 50%;
    animation: compress-spin 0.8s linear infinite;
}

@keyframes compress-spin {
    to {
        transform: rotate(360deg);
    }
}

.compress-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family:   'Cairo', sans-serif !important;
}
[dir="ltr"] .input-wrapper > .currency::after {
  content: "EGP";
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: #020B19;
}
[dir="rtl"] .input-wrapper > .currency::after {
  content: "ج.م";
  position: absolute;
  left: 3rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: #020B19;
}


.review-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 31, 111, 0.18);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: opacity 0.35s ease;
  opacity: 0;
}

  .review-loader-overlay.show {
    display: flex !important;
    animation: rlOverlayIn 0.4s ease forwards;
  }

@keyframes rlOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.review-loader-card {
  width: 92%;
  max-width: 340px;
  background: linear-gradient(145deg, rgba(255,255,255,0.97), rgba(249,250,252,0.95));
  border-radius: 28px;
  box-shadow:
    0 24px 64px rgba(8, 31, 111, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset,
    0 1px 3px rgba(0,0,0,0.06);
  padding: 36px 28px 30px;
  text-align: center;
  animation: rlCardBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  position: relative;
  overflow: hidden;
}

/* Decorative shimmer stripe */
.review-loader-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,119,1,0.06), transparent);
  animation: rlShimmer 2.5s ease-in-out infinite;
}

@keyframes rlShimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}

@keyframes rlCardBounceIn {
  0%   { opacity: 0; transform: scale(0.85) translateY(20px); }
  60%  { opacity: 1; transform: scale(1.03) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Brand logo */
.review-loader-brand {
  margin-bottom: 22px;
}

.review-loader-logo {
  height: auto;
  width: 5rem;
  animation: rlLogoPulse 2s ease-in-out infinite;
}

@keyframes rlLogoPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.04); }
}

/* Bouncing dots */
.review-loader-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.rl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  animation: rlBounce 1.4s ease-in-out infinite both;
}

.rl-dot-1 {
  background: linear-gradient(135deg, #FF7701, #FDA877);
  animation-delay: 0s;
}

.rl-dot-2 {
  background: linear-gradient(135deg, #081F6F, #3B5BDB);
  animation-delay: 0.16s;
}

.rl-dot-3 {
  background: linear-gradient(135deg, #B39FE0, #8B6FD0);
  animation-delay: 0.32s;
}

@keyframes rlBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* Loading text */
.review-loader-text {
  margin: 0;
  color: #081F6F;
  font-size: 15px;
  font-weight: 600;
  font-family:  'Cairo',  sans-serif;
  letter-spacing: 0.3px;
  animation: rlTextPulse 2s ease-in-out infinite;
}

@keyframes rlTextPulse {
  0%, 100% { opacity: 0.65; }
  50%      { opacity: 1; }
}

@keyframes reviewSpin {
  from { transform: rotate(35deg); }
  to   { transform: rotate(395deg); }
}

.fixed-lang-mode .lang-toggle {
  display: none !important;
}