﻿/* =========================================================
   careers-apply.css — eligibility gate + premium application
   form on /careers. Loaded after blog.css so it can reuse
   .field / .form-error / file-input styling and extend it.
   ========================================================= */

.ca-wrap {
    max-width: 860px;
    margin: 0 auto;
}

/* ---------- step pills (Eligibility -> Application -> Done) ---------- */
.ca-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 40px;
}

.ca-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--muted);
}

.ca-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    color: var(--muted);
    font-size: 0.8rem;
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

.ca-step.is-active .ca-step-num {
    background: linear-gradient(135deg, var(--green), var(--green-bright));
    color: #0e2200;
    border-color: transparent;
    box-shadow: 0 6px 16px -4px rgba(124, 179, 66, 0.6);
}

.ca-step.is-active {
    color: var(--heading);
}

.ca-step.is-done .ca-step-num {
    background: var(--navy);
    color: #fff;
    border-color: transparent;
}

.ca-step-line {
    width: 34px;
    height: 2px;
    background: var(--line);
}

/* ---------- shared glass card ---------- */
.ca-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
    padding: 40px clamp(20px, 5vw, 48px);
}

    .ca-card + .ca-card {
        margin-top: 26px;
    }

/* Flat variant — used on pages that don't want the bordered card look,
   e.g. Careers Apply. Keeps the same padding/spacing, just drops the
   visible box (border, background, shadow, blur). */
.ca-card--flat {
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.ca-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 10px;
}

    .ca-eyebrow::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--green);
    }

.ca-card h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 0 10px;
}

.ca-card > p.ca-lede {
    color: var(--muted);
    font-size: 1.02rem;
    max-width: 60ch;
    margin-bottom: 30px;
}

/* ---------- eligibility rule list ---------- */
.rule-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 10px;
}

.rule-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--input-bg);
    transition: border-color .2s ease, background-color .2s ease;
}

    .rule-item.is-checked,
    .rule-item:has(.rule-input:checked) {
        border-color: #00C853;
        background: rgba(124, 179, 66, 0.07);
    }

.rule-check {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    user-select: none;
}

.rule-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rule-box {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    border-radius: 7px;
    border: 2px solid var(--line);
    background: var(--input-bg);
    display: grid;
    place-items: center;
    transition: all .18s ease;
    border-color: #00C853;
}

    .rule-box::after {
        content: "";
        width: 12px;
        height: 7px;
        border-left: 2.5px solid #fff;
        border-bottom: 2.5px solid #fff;
        transform: rotate(-45deg) translateY(-1px);
        opacity: 0;
        transition: opacity .15s ease;
    }

.rule-input:checked + .rule-box {
    background: linear-gradient(135deg, var(--green), var(--green-bright));
    border-color: transparent;
}

    .rule-input:checked + .rule-box::after {
        opacity: 1;
    }

.rule-input:focus-visible + .rule-box {
    box-shadow: 0 0 0 4px rgba(124, 179, 66, 0.25);
}

.rule-text {
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--ink);
}

    .rule-text small {
        display: block;
        margin-top: 3px;
        color: var(--muted);
        font-size: 0.85rem;
    }

.ca-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 28px;
}

.ca-progress-track {
    flex: 1;
    height: 6px;
    border-radius: 100px;
    background: var(--pill-bg);
    overflow: hidden;
}

.ca-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--green), var(--green-bright));
    transition: width .35s ease;
}

.ca-progress-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}

/* ---------- 5 eligibility conditions ---------- */
.ca-conditions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.ca-cond {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border: 1.5px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, var(--input-bg));
    padding: 20px 22px;
    box-shadow: 0 2px 10px -6px rgba(20, 30, 50, 0.12);
    transition: border-color .2s ease, background-color .2s ease, box-shadow .25s ease, transform .25s ease;
}

    .ca-cond:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px -10px rgba(20, 30, 50, 0.22);
    }

    .ca-cond:nth-child(1) {
        grid-column: 1 / -1;
    }

.ca-cond-num {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--navy);
    color: #fff;
    font-weight: 800;
    font-size: 0.92rem;
    box-shadow: 0 4px 10px -3px rgba(30, 58, 110, 0.5);
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ca-cond-body {
    flex: 1;
    min-width: 0;
}

.ca-cond-label {
    display: block;
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 12px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.ca-cond-input {
    width: 100%;
    max-width: 280px;
    font-family: var(--font);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--input-text);
    padding: 13px 18px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(20, 30, 50, 0.04);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease, transform .15s ease;
}

select.ca-cond-input {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%235a6b88' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 42px;
}

.ca-cond-input::placeholder {
    color: #a7b2c4;
    font-weight: 500;
}

.ca-cond-input:hover {
    border-color: #b7c3d6;
}

.ca-cond-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(124, 179, 66, 0.16);
    transform: translateY(-1px);
}

.ca-cond-hint {
    display: block;
    margin-top: 9px;
    font-size: 0.81rem;
    color: var(--muted);
    font-weight: 500;
}

    .ca-cond-hint strong {
        color: var(--heading);
    }


/* ---------- not-eligible popup ---------- */
.ca-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 20, 34, 0.55);
    backdrop-filter: blur(3px);
    animation: caModalFadeIn .18s ease;
}

    .ca-modal-overlay[hidden] {
        display: none;
    }

.ca-modal {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: var(--radius-lg, 18px);
    box-shadow: 0 24px 60px -12px rgba(12, 20, 34, 0.45);
    padding: 34px 28px 28px;
    text-align: center;
    animation: caModalPopIn .22s cubic-bezier(.2, .9, .3, 1.3);
}

.ca-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

    .ca-modal-close:hover {
        background: var(--pill-bg);
        color: var(--heading);
    }

.ca-modal-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(214, 69, 69, 0.1);
}

.ca-modal h3 {
    font-size: 1.25rem;
    margin: 0 0 10px;
    color: var(--heading);
}

.ca-modal p {
    font-size: 0.94rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0 0 22px;
}

.ca-modal .btn {
    width: 100%;
}

@keyframes caModalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes caModalPopIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .ca-conditions {
        grid-template-columns: 1fr;
    }

    .ca-cond-input {
        max-width: 100%;
    }
}

/* ---------- application form ---------- */

#ca-name {
    border-color: #000000;
}

#ca-email {
    border-color: #000000;
}

#ca-phone {
    border-color: #000000;
}

#ca-dob {
    border-color: #000000;
}

#ca-gender {
    border-color: #000000;
}

#ca-city {
    border-color: #000000;
}

#ca-address {
    border-color: #000000;
}

.ca-form-section {
    display: none;
}

.ca-form-back {
    background: none;
    border: 0;
    padding: 0;
    margin-bottom: 18px;
    cursor: pointer;
    color: var(--green);
    font-weight: 700;
    font-size: 0.9rem;
}

    .ca-form-back:hover {
        text-decoration: underline;
    }

.ca-fieldset {
    margin-bottom: 34px;
    border: 0;
}

    .ca-fieldset:last-of-type {
        margin-bottom: 0;
    }

.ca-fieldset-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
    border-color: #000000;
}

.ca-fieldset-num {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: safe center;
    background: var(--navy);
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
}

.ca-fieldset-head h3 {
    font-size: 1.08rem;
    margin: 0;
    color: var(--heading);
}

.ca-fieldset-head span {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
    margin-top: 2px;
}

.ca-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 22px;
}

    .ca-grid .field {
        grid-column: span 1;
    }

        .ca-grid .field.full {
            grid-column: 1 / -1;
        }

.field select {
    width: 100%;
    font-family: var(--font);
    font-size: 0.98rem;
    color: var(--input-text);
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--input-bg);
    transition: border-color .2s ease, box-shadow .2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%235a6b88' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

    .field select:focus {
        outline: none;
        border-color: var(--green);
        box-shadow: 0 0 0 4px rgba(124, 179, 66, 0.14);
    }

.ca-declare {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--input-bg);
    cursor: pointer;
}

    .ca-declare .rule-box {
        margin-top: 1px;
    }

    .ca-declare span.dtext {
        font-size: 0.92rem;
        color: var(--muted);
        line-height: 1.5;
    }

#ca-submit {
    width: 100%;
    margin-top: 24px;
}

/* ---------- success ---------- */
.ca-done {
    text-align: center;
    padding: 30px 0;
}

.ca-done-icon {
    width: 78px;
    height: 78px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    animation: caSuccessGlow 2.5s ease-in-out infinite;
}

    .ca-done-icon svg {
        width: 100%;
        height: 100%;
        overflow: visible;
    }


/* Green circle */
.ca-success-circle {
    fill: rgba(46, 125, 50, 0.08);
    stroke: #2e7d32;
    stroke-width: 5;
    stroke-dasharray: 276;
    stroke-dashoffset: 276;
    transform-origin: center;
    animation: caCircleDraw 2.5s ease-in-out infinite;
}


/* Tick */
.ca-success-tick {
    fill: none;
    stroke: #2e7d32;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 65;
    stroke-dashoffset: 65;
    animation: caTickDraw 2.5s ease-in-out infinite;
}


/* Circle draw */
@keyframes caCircleDraw {

    0% {
        stroke-dashoffset: 276;
        opacity: 0;
        transform: scale(0.85);
    }

    15% {
        opacity: 1;
    }

    45% {
        stroke-dashoffset: 0;
        transform: scale(1);
    }

    75% {
        stroke-dashoffset: 0;
        transform: scale(1);
    }

    100% {
        stroke-dashoffset: 276;
        opacity: 0;
        transform: scale(0.85);
    }
}


/* Tick draw */
@keyframes caTickDraw {

    0%, 30% {
        stroke-dashoffset: 65;
        opacity: 0;
    }

    50% {
        stroke-dashoffset: 65;
        opacity: 1;
    }

    70% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    82% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 65;
        opacity: 0;
    }
}


/* Green glow */
@keyframes caSuccessGlow {

    0% {
        filter: drop-shadow(0 0 0 rgba(46, 125, 50, 0));
        transform: scale(0.92);
    }

    35% {
        filter: drop-shadow(0 0 5px rgba(46, 125, 50, 0.25)) drop-shadow(0 0 14px rgba(46, 125, 50, 0.18));
        transform: scale(1);
    }

    55% {
        filter: drop-shadow(0 0 8px rgba(46, 125, 50, 0.35)) drop-shadow(0 0 22px rgba(46, 125, 50, 0.22));
        transform: scale(1.03);
    }

    75% {
        filter: drop-shadow(0 0 5px rgba(46, 125, 50, 0.25)) drop-shadow(0 0 14px rgba(46, 125, 50, 0.18));
        transform: scale(1);
    }

    100% {
        filter: drop-shadow(0 0 0 rgba(46, 125, 50, 0));
        transform: scale(0.92);
    }
}
/* ---------- application form ---------- */

.ca-grid .field input,
.ca-grid .field select,
.ca-grid .field textarea {
    border-color: #000000;
}

    .ca-grid .field input:focus,
    .ca-grid .field select:focus,
    .ca-grid .field textarea:focus {
        border-color: #000000;
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
        outline: none;
    }


.ca-field-error {
    display: none;
    margin-top: 7px;
    color: #d64545;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

    .ca-field-error.show {
        display: block;
    }

.ca-cond-input.ca-invalid {
    border-color: #d64545 !important;
    box-shadow: 0 0 0 2px rgba(214, 69, 69, 0.12);
}

.ca-cond-input.ca-valid {
    border-color: #7cb342 !important;
}
