/* Reset */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/* Body */
body{
    font-family: 'optima', sans-serif;
    padding:40px;
    background-image: url('../images/desktop.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color:#fff;
}

input, button, textarea, select{
    font-family: 'optima', sans-serif;
    color:#fff;
}

/* Logo */
.logo{
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:column;
    margin:30px 0;
}

.logo .heading{
    margin-top:40px;
    font-size:28px;
}

/* ================= TOGGLE ================= */
.form-toggle-wrapper{
    display:flex;
    justify-content:center;
    margin-bottom:30px;
}

.form-toggle{
    display:flex;
    background:rgba(255,255,255,0.08);
    border:1px solid rgba(255,255,255,0.2);
    border-radius:50px;
    padding:4px;
    gap:4px;
}

.toggle-btn{
    padding:10px 36px;
    border-radius:50px;
    border:none;
    cursor:pointer;
    font-family:'optima', sans-serif;
    font-size:15px;
    font-weight:600;
    color:rgba(255,255,255,0.5);
    background:transparent;
    transition: all 0.25s ease;
    width:auto;
    margin-top:0;
}

.toggle-btn.active{
    background:rgba(255,255,255,0.18);
    color:#fff;
}

.toggle-btn:hover:not(.active){
    color:rgba(255,255,255,0.8);
    background:rgba(255,255,255,0.06);
}
/* ========================================== */

/* Form container */
.form-container{
    max-width:800px;
    margin:auto;
    padding:40px;
    border-radius:25px;
    margin-top:10px;
    margin-bottom:60px;
    background:rgba(255,255,255,0.05);
    backdrop-filter:blur(10px);
    position:relative;
}

.form-container::before{
    content:"";
    position:absolute;
    inset:0;
    padding:1px;
    border-radius:inherit;
    background:linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0));
    -webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite:xor;
    pointer-events:none;
}

/* Section */
.section-title{
    font-size:20px;
    font-weight:600;
    margin-bottom:25px;
    border-bottom:1px solid rgba(255,255,255,0.3);
    padding-bottom:10px;
    display:flex;
    align-items:center;
    gap:12px;
}

.optional-tag{
    font-size:12px;
    font-weight:400;
    color:rgba(255,255,255,0.45);
    border:1px solid rgba(255,255,255,0.25);
    border-radius:20px;
    padding:2px 10px;
    letter-spacing:0.5px;
}

/* Layout */
.form-row{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:10px;
    margin-bottom:20px;
}

.form-row.full{
    grid-template-columns:1fr;
}

.form-group{
    display:flex;
    flex-direction:column;
    margin-bottom:15px;
}

/* Labels */
label{
    font-size:14px;
    margin-bottom:6px;
}

/* Inputs */
input[type="text"],
input[type="date"],
input[type="email"],
input[type="number"],
select,
textarea{
    padding:12px;
    border-radius:6px;
    border:1px solid rgba(255,255,255,0.3);
    background:rgba(255,255,255,0.08);
    outline:none;
    width: 100%;
}

input:focus,
textarea:focus,
select:focus{
    border-color:#fff;
    background:rgba(255,255,255,0.15);
}

input::placeholder,
textarea::placeholder,
select::placeholder{
    color: #ffffff80;
}

/* Base styling */
input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    color: #ffffff;
    outline: none;
}

/* Faded look (acts like placeholder) */
input[type="date"]::-webkit-datetime-edit {
    color: #ffffff80;
}

/* When value is selected */
input[type="date"].has-value::-webkit-datetime-edit {
    color: #ffffff;
}

/* Optional focus styling */
input[type="date"]:focus {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.15);
}

/* Disabled */
input[type="date"]:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}


/* Calendar icon (Chrome, Edge, Safari) */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Remove default inner padding in some browsers */
input[type="date"]::-webkit-datetime-edit {
    padding: 0;
}

/* Optional: make text look like placeholder when empty */
input[type="date"]:invalid {
    color: #999;
}

/* Calendar icon */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* ================= TOM SELECT OVERRIDE ================= */
.ts-wrapper.form-control,
.ts-wrapper{
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.ts-control{
    padding: 10px 12px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    font-family: 'optima', sans-serif !important;
    font-size: 14px !important;
    box-shadow: none !important;
    cursor: pointer;
    min-height: unset !important;
    flex-wrap: nowrap;
}

.ts-wrapper.focus .ts-control{
    border-color: #fff !important;
    background: rgba(255,255,255,0.15) !important;
    box-shadow: none !important;
}

.ts-control .placeholder{
    color: rgba(255,255,255,0.45) !important;
}

.ts-control .item{
    color: #fff !important;
    font-family: 'optima', sans-serif !important;
}

.ts-control input{
    color: #fff !important;
    font-family: 'optima', sans-serif !important;
    font-size: 14px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    caret-color: #fff;
}

.ts-control input::placeholder{
    color: rgba(255,255,255,0.45) !important;
}

.ts-dropdown{
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: 6px !important;
    color: #0a0a0a !important;
    font-family: 'optima', sans-serif !important;
    font-size: 14px !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
    margin-top: 4px !important;
}

.ts-dropdown .option{
    padding: 10px 14px !important;
    color: rgba(0, 0, 0, 0.85) !important;
    cursor: pointer;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active{
    background: rgba(255,255,255,0.12) !important;
    color: #000000 !important;
}

.ts-dropdown .option.selected{
    background: rgba(255,255,255,0.18) !important;
    color: #000000 !important;
    font-weight: 600;
}

.ts-dropdown .no-results,
.ts-dropdown .option-header{
    color: rgba(255,255,255,0.5) !important;
    padding: 10px 14px !important;
}

.ts-wrapper .ts-control::after{
    border-top-color: rgba(255,255,255,0.6) !important;
}

.ts-wrapper.disabled .ts-control{
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}
/* ======================================================= */

/* ================= RADIO FIX ================= */
.radio-group{
    display:flex;
    gap:25px;
    align-items:center;
    flex-wrap:wrap;
    margin-top:10px;
}

.custom-radio{
    display:inline-flex;
    align-items:center;
    gap:8px;
    cursor:pointer;
    font-size:14px;
    line-height:1;
}

.custom-radio input{
    display:none;
}

.custom-radio .radio-btn{
    width:18px;
    height:18px;
    border:2px solid rgba(255,255,255,0.6);
    border-radius:50%;
    position:relative;
    flex-shrink:0;
}

.custom-radio input:checked + .radio-btn::after{
    content:"";
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    width:8px;
    height:8px;
    background:#fff;
    border-radius:50%;
}
/* ============================================ */

/* File upload */
.file-upload{
    display:flex;
    justify-content:center;
    align-items:center;
    padding:12px;
    border-radius:6px;
    border:1px solid rgba(255,255,255,0.3);
    background:rgba(255,255,255,0.08);
    cursor:pointer;
    text-align:center;
}

.file-upload input{
    display:none;
}

/* Submit button */
button[type="submit"]{
    margin-top:20px;
    padding:12px;
    border-radius:6px;
    border:none;
    cursor:pointer;
    font-weight:600;
    background:rgba(255,255,255,0.15);
    width:100%;
    font-size:16px;
    color:#fff;
}

button[type="submit"]:hover{
    background:rgba(255,255,255,0.25);
}

.file-upload.disabled{
    opacity:0.5;
    pointer-events:none;
}

.payment-grid{
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    gap:12px 20px;
    align-items:center;
}

/* ================= REPEATABLE ROWS ================= */
.repeatable-row{
    position:relative;
}

.repeatable-divider{
    border-bottom:1px solid rgba(255,255,255,0.1);
    margin-bottom:20px;
}

.add-btn{
    margin-top:0 !important;
    margin-bottom:12px;
    padding:6px 18px !important;
    border-radius:6px !important;
    border:1px solid rgba(255, 255, 255, 0.4) !important;
    background:rgba(255, 255, 255, 0.12) !important;
    color:rgba(255, 255, 255, 0.9) !important;
    font-size:13px !important;
    font-weight:500 !important;
    cursor:pointer !important;
    width:auto !important;
}

.add-btn:hover{
    background:rgba(255,255,255,0.2) !important;
}

.remove-btn{
    margin-top:0 !important;
    margin-bottom:12px;
    padding:6px 18px !important;
    border-radius:6px !important;
    border:1px solid rgba(255,100,100,0.4) !important;
    background:rgba(255,80,80,0.12) !important;
    color:rgba(255,180,180,0.9) !important;
    font-size:13px !important;
    font-weight:500 !important;
    cursor:pointer !important;
    width:auto !important;
}

.remove-btn:hover{
    background:rgba(255,80,80,0.25) !important;
}

.repeatable-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px 0;
}

.add-btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 8px 0 16px 0;
    padding: 6px 14px;
    font-size: 13px !important;
}

/* ===== PHONE INPUT MATCH YOUR UI ===== */

.iti {
    width: 100%;
    font-family: 'optima', sans-serif;
}

/* Main input */
.iti input {
    width: 100%;
    padding: 12px 12px 12px 58px !important;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.08);
    color: #fff;
    outline: none;
}

/* Focus same as your inputs */
.iti input:focus {
    border-color: #fff;
    background: rgba(255,255,255,0.15);
}

/* Flag container */
.iti__flag-container {
    left: 0;
    padding-left: 10px;
}

/* Selected flag area */
.iti__selected-flag {
    background: transparent !important;
    border-right: 1px solid rgba(255,255,255,0.2);
    padding: 0 10px;
}

/* Dial code text (+971 etc) */
.iti__selected-dial-code {
    color: #fff;
    font-size: 14px;
}

/* Dropdown */
.iti__country-list {
    background: rgba(255,255,255,0.95);
    color: #000;
    border-radius: 6px;
    font-family: 'optima', sans-serif;
}

/* Dropdown items */
.iti__country {
    padding: 10px 14px;
}

.iti__country:hover {
    background: rgba(0,0,0,0.05);
}

/* Fix arrow color */
.iti__arrow {
    border-top-color: rgba(255,255,255,0.7);
}

/* Disabled look */
.iti--disabled input {
    opacity: 0.5;
    cursor: not-allowed;
}

.iti__arrow {
    border-top-color: #ffffff !important;
    opacity: 1 !important;
}

/* When dropdown is open */
.iti__arrow.iti__arrow--up {
    border-top-color: transparent !important;
    border-bottom-color: #fff !important;
}

.iti__search-input {
    color: #000 !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
}

/* Placeholder color */
.iti__search-input::placeholder {
    color: #666 !important;
}


/* ── Error message styling ── */
.error-message {
    display: none;
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    font-family: 'optima', sans-serif;
}

.input-error {
    border-color: rgba(255, 100, 100, 0.7) !important;
    background: rgba(255, 80, 80, 0.08) !important;
}

/* ── Declaration block ── */
.declaration-block {
    margin: 28px 0 20px;
    padding: 25px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    position: relative;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.declaration-block::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    pointer-events: none;
}

.declaration-text {
    font-family: 'optima', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 5px;
}
.declaration-text-main {
    font-family: 'optima', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 5px;
}

.declaration-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.declaration-checkbox-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    margin-top: 2px;
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.declaration-checkbox-row input[type="checkbox"]:checked {
    background: rgba(255, 255, 255, 0.9);
    border-color: #fff;
}

.declaration-checkbox-row input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: 2px solid rgba(0, 0, 0, 0.75);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.declaration-checkbox-row span {
    font-family: 'optima', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.declaration-block.shake {
    animation: shake 0.4s ease;
    border-color: rgba(255, 100, 100, 0.6) !important;
    background: rgba(255, 80, 80, 0.1) !important;
}

/* Logo container */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

/* Logo image */
.logo img {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
}

/* Logo heading text */
.logo .heading {
    font-family: 'Optima', sans-serif;
    font-size: 26px;
    font-weight: 400;
    color: #fff;
    flex-basis: 100%;
}

.material-icons {
    font-size: 20px !important;
    vertical-align: middle;
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    .logo .heading {
        font-size: 22px;
    }
    .logo img {
        max-width: 140px;
    }
}

/* Responsive */
@media (max-width:768px){
    .form-row{
        grid-template-columns:1fr;
    }

    body{
        padding:20px;
    }

    .payment-grid{
        grid-template-columns: repeat(2, 1fr);
    }

    .toggle-btn{
        padding:10px 24px;
    }
}



/* ── File Upload Preview ───────────────────────────────────────── */
.file-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    animation: fileSlideIn 0.2s ease;
}

.file-preview-left{
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-preview-right{
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.file-preview-item .file-icon {
    font-size: 18px;
    flex-shrink: 0;
    opacity: 0.8;
}

.file-preview-item .file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.file-preview-item .file-size {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
}

.file-preview-item .file-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.file-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 7px;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.15s;
    line-height: 1;
    color: rgba(255,255,255,0.7);
}

.file-action-btn:hover { background: rgba(255,255,255,0.12); }
.file-action-btn.remove-file:hover { background: rgba(255,80,80,0.18); color: #ff6b6b; }

/* ── Image / PDF preview modal ─────────────────────────────────── */
.file-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}
.file-modal-overlay.active { display: flex; }

.file-modal-box {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 20px;
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.file-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    color: #4c0707;
    gap: 16px;
}

.file-modal-close {
    background: rgba(76,7,7,0.1);
    border: none;
    color: #4c0707;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.file-modal-close:hover { background: #4c0707; color: #ffffff }

.file-modal-body {
    overflow: auto;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-modal-body img {
    max-width: 80vw;
    max-height: 75vh;
    border-radius: 6px;
    object-fit: contain;
    display: block;
}

.file-modal-body iframe {
    width: min(800px, 85vw);
    height: 75vh;
    border: none;
    border-radius: 6px;
    background: #fff;
}

/* ── PEP extra fields ──────────────────────────────────────────── */
#pep_details_section,
#dual_passport_section {
    animation: slideDown 0.25s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}


.declaration-text-heading{
    font-family: 'optima', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
}