/*
 * Registration theme tokens. Defaults are the IFCL brand; a client theme
 * (e.g. .theme-linde in linde.theme.css) overrides them on a wrapper so the
 * same components render in that client's colours.
 */
:root
{
    --reg-brand: #FAC710;
    --reg-brand-hover: #e6b50e;
    --reg-brand-contrast: #212529;
    --reg-brand-ring: rgba(250, 199, 16, 0.25);
    --reg-page-bg: #f4f5f7;
}

.dobContainer
{
    margin: auto 0;
    width: 100%;
}

.registration-grey
{
    color: rgba(56,56,56,0.57);
}

.personal-info,
.credentials,
.voucher,
.final-info,
.registration-images
{
    display: flex;
}

.final-info
{
    justify-content: space-between;
}

.personal-info-left,
.credentials-left,
.voucher-left,
.registration-images-left,
.final-info-left
{
    width: 70%;
}

.final-info-right
{
    display: flex;
    flex-direction: column;
}

@media screen and (max-width: 1024px) {
    .personal-info-right,
    .credentials-right,
    .voucher-right
    {
        width: 35% !important;
    }
}

.personal-info-text,
.credentials-text,
.voucher-text
{
    margin-left: 10px;
    font-size: 1rem;
    color: #80808091;
}

.final-info-row
{
    display: flex;
    justify-content: center;
}

.register-button
{
    height: 60px;
    color: white;
    display: flex;
    align-content: center;
    align-items: center;
    width: max-content;
    padding: 0 30px;
}

.switch
{
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input
{
    opacity: 0;
    width: 0;
    height: 0;
}

.slider
{
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before
{
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider
{
    background-color: var(--reg-brand);
}

input:focus + .slider
{
    box-shadow: 0 0 1px var(--reg-brand);
}

input:checked + .slider:before
{
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.inner-content
{
    padding: 10% 8%;
}

.registration-success-check
{
    width: 55px;
    height: 55px;
}

.registration-success-header-text
{
    color: var(--reg-brand);
}

/* Rounded sliders */
.slider.round
{
    border-radius: 34px;
}

.slider.round:before
{
    border-radius: 50%;
}

/*
 * FilePond Custom Styles
 */
.filepond--drop-label
{
    color: #4c4e53;
}

.filepond--label-action
{
    text-decoration-color: #babdc0;
}

#pass_photo.filepond--panel-root
{
    /*background-color: #edf0f4;*/
}

#photo_id.filepond--panel-root
{
    border-radius: 2em;
    background-color: #edf0f4;
    height: 1em;
}

#photo_id .filepond--drop-label,
#pass_photo .filepond--drop-label
{
    background-color: #F1F0EF;
    min-height: 40px !important;
}

/*#photoId.filepond--drip-blob {*/
/*    background-color: #7f8a9a;*/
/*}*/

.filepond--credits
{
    display: none;
}

#photo_id .filepond--list-scroller,
#pass_photo .filepond--list-scroller
{
    height: 90px !important;
    /* Clip the preview to the fixed 90px area so it cannot paint over the
       content below it (the next upload field / data-protection row). Paired
       with the JS min-height reserve on the root that supplies the flow space. */
    overflow: hidden;
}


/*
    Language selector
 */
.dd-selected-image,
.dd-options img
{
    width: 40px;
    height: 40px;
}

.dd-selected
{
    padding: 0 10px !important;
}

.dd-selected-text,
.dd-option-text
{
    line-height: 42px !important;
}


/*
    Privacy Popup
 */
.privacy-text {
    overflow-x: auto;
    word-wrap: break-word;
    display: table;
}


/*
    Loading Screen
 */
.loader-container {
    width: 100%;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    background: #000;
    opacity: 25%;
    z-index: 100;
}

.spinner {
    width: 64px;
    height: 64px;
    border: 8px solid;
    border-color: #3d5af1 transparent #3d5af1 transparent;
    border-radius: 50%;
    animation: spin-anim 1.2s linear infinite;
}

/*
 * Registration wizard (multi-step form)
 *
 * Step indicator: numbered circles connected by a line, with done / active /
 * upcoming states. States are toggled from JS (renderStep).
 */
.wizard-steps
{
    display: flex;
    margin-bottom: 30px;
}

.wizard-step-indicator
{
    flex: 1;
    position: relative;
    text-align: center;
}

/* Connecting line: a segment from the previous circle's centre to this one,
   drawn behind the circles. Coloured when the step is reached. */
.wizard-step-indicator:not(:first-child)::before
{
    content: "";
    position: absolute;
    top: 17px;
    left: -50%;
    width: 100%;
    height: 3px;
    background: #ced4da;
    z-index: 0;
    transition: background 0.3s ease;
}

.wizard-step-indicator.is-done::before,
.wizard-step-indicator.is-active::before
{
    background: var(--reg-brand);
}

.wizard-step-circle
{
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    line-height: 32px;
    border-radius: 50%;
    margin: 0 auto 8px;
    background: #fff;
    border: 2px solid #ced4da;
    color: #6c757d;
    font-weight: 700;
    box-sizing: border-box;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.wizard-step-indicator.is-active .wizard-step-circle
{
    background: var(--reg-brand);
    border-color: var(--reg-brand);
    color: var(--reg-brand-contrast);
    box-shadow: 0 0 0 6px var(--reg-brand-ring);
}

.wizard-step-indicator.is-done .wizard-step-circle
{
    background: var(--reg-brand);
    border-color: var(--reg-brand);
    color: var(--reg-brand-contrast);
}

.wizard-step-caption
{
    font-size: 14px;
    color: #6c757d;
}

.wizard-step-indicator.is-active .wizard-step-caption
{
    color: #212529;
    font-weight: 700;
}

.wizard-nav
{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.wizard-nav .wizard-nav-spacer
{
    flex: 1;
}

.btn-wizard
{
    height: 52px;
    padding: 0 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-wizard-next
{
    background: var(--reg-brand);
    color: var(--reg-brand-contrast);
    border-color: var(--reg-brand);
}

.btn-wizard-back
{
    background: #fff;
    color: #212529;
    border-color: #d1d5db;
}

.btn-wizard:disabled
{
    opacity: 0.5;
    cursor: not-allowed;
}

/* While the current step is being validated on the server. */
.btn-wizard.is-validating
{
    cursor: progress;
    animation: wizard-validating-pulse 1s ease-in-out infinite;
}

@keyframes wizard-validating-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/*
 * Mobile / responsive tweaks for the registration wizard
 */
@media screen and (max-width: 767px) {
    /* Step indicator: the captions are too long for a phone; show just the
       numbered circles on the line. */
    .wizard-step-caption
    {
        display: none;
    }

    /* Content wrappers span full width instead of the desktop 70% */
    .personal-info-left,
    .credentials-left,
    .voucher-left,
    .registration-images-left,
    .final-info-left
    {
        width: 100%;
    }

    /* The voucher input sits in a 50% col on desktop; go full width on mobile */
    .voucher-input
    {
        width: 100%;
    }

    /* "Add another code" button: let the label wrap instead of clipping */
    #add-voucher
    {
        height: auto !important;
        min-height: 40px;
        white-space: normal;
    }

    /* Wizard nav: comfortable tap targets, register button full width */
    .btn-wizard
    {
        height: 52px;
        padding: 0 22px;
    }

    .register-button
    {
        width: 100% !important;
        justify-content: center;
    }

    /* Uploads stack on mobile: give each field clear separation and a
       larger, easier-to-tap empty drop zone. */
    .upload-col
    {
        margin-bottom: 24px;
    }

    .upload-col:last-child
    {
        margin-bottom: 0;
    }
}

/*
 * Registration redesign: white card on a soft grey page background.
 * Scoped under .registration-content so admin pages are unaffected.
 */
.registration-content
{
    background: var(--reg-page-bg);
    min-height: calc(100vh - 100px);
    padding: 40px 12% 64px;
}

.reg-card
{
    background: #fff;
    border-radius: 16px;
    padding: 40px 48px 32px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
}

.reg-card-title
{
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
}

.reg-card-intro
{
    color: #6b7280;
    margin: 0 0 28px;
}

.reg-label
{
    font-weight: 700;
    color: #1f2937;
    display: inline-block;
    margin-bottom: 6px;
}

.reg-field
{
    margin-bottom: 24px;
}

.registration-content .form-control
{
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    min-height: 48px;
    padding: 12px 14px;
}

.registration-content .form-control:focus
{
    border-color: var(--reg-brand);
    box-shadow: 0 0 0 3px var(--reg-brand-ring);
}

.registration-content .form-control::placeholder
{
    color: #9ca3af;
}

.reg-hint
{
    color: #9ca3af;
    font-size: 0.85rem;
    margin-top: 6px;
}

.reg-link-btn
{
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 600;
    padding: 0;
    margin-top: 14px;
    cursor: pointer;
}

.reg-link-btn:disabled
{
    color: #9ca3af;
    cursor: not-allowed;
}

.reg-link-btn i
{
    margin-right: 4px;
}

/* Remove-voucher: quiet ghost button that only turns red on hover, so extra
   rows don't shout while they're just sitting there. */
.reg-remove-btn
{
    height: 48px;
    width: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #9ca3af;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.reg-remove-btn:hover
{
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

.reg-notice
{
    display: flex;
    gap: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 14px 16px;
    color: #1e40af;
    margin-bottom: 28px;
}

.reg-notice i
{
    margin-top: 4px;
}

.reg-password-wrap
{
    position: relative;
}

.reg-password-wrap .form-control
{
    padding-right: 48px;
}

.reg-password-toggle
{
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 48px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
}

.reg-divider
{
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 8px 0 24px;
}

.reg-required-legend
{
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 24px;
}

/* Success / failed status pages */
.reg-status-card
{
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
    max-width: 720px;
    margin: 24px auto;
    padding: 56px 48px 40px;
    text-align: center;
}

.reg-status-icon
{
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    font-size: 40px;
}

.reg-status-icon-success
{
    color: #22c55e;
    border-color: #22c55e;
}

.reg-status-icon-failed
{
    color: #dc2626;
    border-color: #dc2626;
}

.reg-status-title
{
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.reg-status-text
{
    color: #6b7280;
    margin-bottom: 32px;
}

.reg-status-button
{
    display: inline-block;
    background: var(--reg-brand);
    color: var(--reg-brand-contrast);
    font-weight: 700;
    border-radius: 10px;
    padding: 14px 32px;
    text-decoration: none;
    margin-bottom: 32px;
}

.reg-status-button:hover
{
    color: var(--reg-brand-contrast);
    filter: brightness(0.96);
}

.reg-status-footer
{
    color: #6b7280;
    margin: 0;
}

.reg-status-footer a
{
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

/* The register button inherits admin styling; align it with the card design. */
.registration-content .register-button
{
    height: 52px;
    color: var(--reg-brand-contrast);
    font-weight: 700;
    border-radius: 10px;
    background: var(--reg-brand);
    border-color: var(--reg-brand);
}

@media screen and (max-width: 767px) {
    .registration-content
    {
        padding: 20px 12px 48px;
    }

    .reg-card
    {
        padding: 24px 18px 20px;
        border-radius: 12px;
    }

    .reg-card-title
    {
        font-size: 1.4rem;
    }

    .reg-status-card
    {
        padding: 36px 20px 28px;
    }
}

/* Server-rendered form errors (non-AJAX registration forms, e.g. Linde). */
.reg-alert-error
{
    display: flex;
    gap: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 14px 16px;
    color: #991b1b;
    margin-bottom: 24px;
}

.reg-alert-error i
{
    margin-top: 4px;
}

.reg-field-error
{
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 6px;
}

.registration-content .form-control.is-invalid
{
    border-color: #dc2626;
    background-image: none;
}

.reg-required
{
    color: #dc2626;
}
