/* =========================================================
   TCCA ENROLMENT MODAL
========================================================= */

.tcca-enrolment-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tcca-enrolment-modal.active {
    display: flex;
}


/* =========================================================
   OVERLAY
========================================================= */

.tcca-enrolment-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}


/* =========================================================
   MODAL DIALOG
========================================================= */

.tcca-enrolment-dialog {
    position: relative;
    z-index: 2;
    width: min(920px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    padding: 38px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.30);
    scrollbar-width: thin;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.tcca-enrolment-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #f3f3f3;
    color: #222222;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.tcca-enrolment-close:hover {
    background: #222222;
    color: #ffffff;
}


/* =========================================================
   HEADER
========================================================= */

.tcca-enrolment-header {
    padding-right: 55px;
    margin-bottom: 30px;
}

.tcca-enrolment-header h2 {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    color: #5c883d;
}

.tcca-enrolment-header p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #666666;
}


/* =========================================================
   FORM SECTIONS
========================================================= */

.tcca-form-section {
    margin-bottom: 30px;
    padding-bottom: 26px;
    border-bottom: 1px solid #eeeeee;
}

.tcca-form-section:last-of-type {
    border-bottom: 0;
}

.tcca-form-section h3 {
    margin: 0 0 20px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: #222222;
}


/* =========================================================
   FORM ROWS
========================================================= */

.tcca-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}


/* =========================================================
   FORM GROUPS
========================================================= */

.tcca-form-group {
    margin-bottom: 18px;
}

.tcca-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    color: #333333;
}

.tcca-form-group label span,
.tcca-form-consent span {
    color: inherit;
}


/* =========================================================
   INPUTS / SELECTS / TEXTAREA
========================================================= */

.tcca-form-group input,
.tcca-form-group select,
.tcca-form-group textarea {
    width: 100%;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #222222;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    padding: 13px 14px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.tcca-form-group input,
.tcca-form-group select {
    min-height: 50px;
}

.tcca-form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.tcca-form-group input:focus,
.tcca-form-group select:focus,
.tcca-form-group textarea:focus {
    border-color: #222222;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.tcca-form-group input::placeholder,
.tcca-form-group textarea::placeholder {
    color: #999999;
}


/* =========================================================
   TRAINING LOCATION
========================================================= */

.tcca-training-location-group[hidden] {
    display: none;
}


/* =========================================================
   CONSENT
========================================================= */

.tcca-form-consent {
    margin-top: 8px;
}

.tcca-form-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
    color: #555555;
}

.tcca-form-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #222222;
}


/* =========================================================
   STATUS MESSAGE
========================================================= */

.tcca-enrolment-status {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.tcca-enrolment-status:empty {
    display: none;
}


/* =========================================================
   SUBMIT BUTTON
========================================================= */

#tccaEnrolmentSubmit {
    width: 100%;
    border: 0;
    cursor: pointer;
}

#tccaEnrolmentSubmit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .tcca-enrolment-modal {
        padding: 10px;
    }

    .tcca-enrolment-dialog {
        max-height: calc(100vh - 20px);
        padding: 28px 20px;
        border-radius: 10px;
    }

    .tcca-enrolment-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .tcca-enrolment-header {
        padding-right: 45px;
        margin-bottom: 25px;
    }

    .tcca-enrolment-header h2 {
        font-size: 26px;
    }

    .tcca-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .tcca-form-section {
        margin-bottom: 25px;
        padding-bottom: 20px;
    }

    .tcca-form-section h3 {
        font-size: 18px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .tcca-enrolment-close,
    .tcca-form-group input,
    .tcca-form-group select,
    .tcca-form-group textarea {
        transition: none;
    }

}
/* =========================================================
   TCCA SUCCESS SCREEN
========================================================= */

.tcca-enrolment-success-screen {
    position: relative;
    width: 100%;
    min-height: 430px;
    padding: 55px 35px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    opacity: 0;
    transform: translateY(15px) scale(0.98);
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

.tcca-enrolment-success-screen.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}


/* =========================================================
   SUBTLE BACKGROUND GLOW
========================================================= */

.tcca-success-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(180, 132, 45, 0.10);
    filter: blur(20px);
    pointer-events: none;
}


/* =========================================================
   SUCCESS ICON
========================================================= */

.tcca-success-icon {
    position: relative;
    z-index: 2;
    width: 92px;
    height: 92px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* SVG itself */

.tcca-success-icon svg {
    width: 92px;
    height: 92px;
    display: block;
    overflow: visible;
}


/* Circle */

.tcca-success-circle {
    fill: #ffffff;
    stroke: #b58a3a;
    stroke-width: 2;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: tccaDrawCircle 0.7s ease forwards;
}


/* Tick */

.tcca-success-check {
    fill: none;
    stroke: #b58a3a;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 45;
    stroke-dashoffset: 45;
    animation:
        tccaDrawCheck 0.55s 0.55s ease forwards;
}


/* =========================================================
   CIRCLE ANIMATION
========================================================= */

@keyframes tccaDrawCircle {

    to {
        stroke-dashoffset: 0;
    }

}


/* =========================================================
   CHECKMARK ANIMATION
========================================================= */

@keyframes tccaDrawCheck {

    to {
        stroke-dashoffset: 0;
    }

}


/* =========================================================
   SUCCESS CONTENT
========================================================= */

.tcca-success-content {
    position: relative;
    z-index: 2;
    max-width: 540px;
}


/* Small eyebrow */

.tcca-success-eyebrow {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 2px;
    font-weight: 700;
    color: #b58a3a;
}


/* Main heading */

.tcca-success-content h2 {
    margin: 0 0 14px;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    color: #222222;
}


/* Main message */

.tcca-success-main {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
}

.tcca-success-main strong {
    color: #222222;
}


/* Secondary message */

.tcca-success-sub {
    margin: 0 auto;
    max-width: 500px;
    font-size: 14px;
    line-height: 1.75;
    color: #777777;
}


/* =========================================================
   APPLICATION REFERENCE
========================================================= */

.tcca-application-reference {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 22px;
    padding: 12px 22px;
    border: 1px solid rgba(181, 138, 58, 0.25);
    border-radius: 10px;
    background: rgba(181, 138, 58, 0.06);
}


.tcca-application-reference span {
    font-size: 9px;
    line-height: 1.3;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #9a7837;
}


.tcca-application-reference strong {
    font-size: 15px;
    letter-spacing: 0.5px;
    color: #222222;
}


/* =========================================================
   DIVIDER
========================================================= */

.tcca-success-divider {
    width: 45px;
    height: 1px;
    margin: 22px auto 16px;
    background: #d8bd86;
}


/* =========================================================
   FINAL NOTE
========================================================= */

.tcca-success-note {
    margin: 0 0 22px;
    font-size: 13px;
    line-height: 1.6;
    font-style: italic;
    color: #888888;
}


/* =========================================================
   DONE BUTTON
========================================================= */

.tcca-success-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 125px;
    min-height: 44px;
    padding: 10px 24px;
    border: 0;
    border-radius: 6px;
    background: #222222;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}


.tcca-success-close:hover {
    background: #b58a3a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}


/* =========================================================
   SUBMIT SPINNER
========================================================= */

.tcca-submit-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 8px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: tccaSubmitSpin 0.7s linear infinite;
}


@keyframes tccaSubmitSpin {

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   MOBILE SUCCESS SCREEN
========================================================= */

@media (max-width: 767px) {

    .tcca-enrolment-success-screen {
        min-height: 400px;
        padding: 45px 20px 30px;
    }

    .tcca-success-icon {
        width: 78px;
        height: 78px;
        margin-bottom: 20px;
    }

    .tcca-success-icon svg {
        width: 78px;
        height: 78px;
    }

    .tcca-success-content h2 {
        font-size: 26px;
    }

    .tcca-success-main {
        font-size: 15px;
    }

    .tcca-success-sub {
        font-size: 13px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .tcca-enrolment-success-screen {
        transition: none;
        transform: none;
    }

    .tcca-success-circle,
    .tcca-success-check {
        animation: none;
        stroke-dashoffset: 0;
    }

    .tcca-success-close {
        transition: none;
    }

}
/* =========================================================
   TCCA SUCCESS MODE — COMPACT DIALOG
========================================================= */

.tcca-enrolment-dialog.tcca-success-mode {
    width: min(620px, calc(100vw - 40px));
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 0;
}


/* =========================================================
   SUCCESS SCREEN
========================================================= */

.tcca-success-mode .tcca-enrolment-success-screen {
    min-height: 0;
    padding: 48px 42px 42px;
}


/* =========================================================
   TCCA GREEN
========================================================= */

.tcca-success-glow {
    background: rgba(92, 136, 61, 0.10);
}

.tcca-success-circle {
    stroke: #5c883d;
}

.tcca-success-check {
    stroke: #5c883d;
}

.tcca-success-eyebrow {
    color: #5c883d;
}

.tcca-application-reference {
    border-color: rgba(92, 136, 61, 0.25);
    background: rgba(92, 136, 61, 0.06);
}

.tcca-application-reference span {
    color: #5c883d;
}

.tcca-success-divider {
    background: #5c883d;
}


/* =========================================================
   BROCHURE BUTTON
========================================================= */

.tcca-success-close {
    text-decoration: none;
    background: #5c883d;
    color: #ffffff;
}

.tcca-success-close:hover {
    background: #456a2e;
    color: #ffffff;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .tcca-enrolment-dialog.tcca-success-mode {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 40px);
    }

    .tcca-success-mode .tcca-enrolment-success-screen {
        padding: 38px 22px 32px;
    }

}
/* =========================================================
   TCCA NORMAL FORM MODE
   Restore proper spacing after success screen
========================================================= */

.tcca-enrolment-dialog:not(.tcca-success-mode) {
    padding: 38px;
}


/* Keep the main heading properly contained */

.tcca-enrolment-dialog:not(.tcca-success-mode)
.tcca-enrolment-header {
    padding-right: 55px;
}


.tcca-enrolment-dialog:not(.tcca-success-mode)
.tcca-enrolment-header h2 {
    margin: 0 0 10px;
    font-size: 32px !important;
    line-height: 1.2;
    font-weight: 700;
}


/* Keep all form content away from edges */

.tcca-enrolment-dialog:not(.tcca-success-mode)
#tccaEnrolmentForm {
    width: 100%;
}


/* Inputs should never visually touch the modal edges */

.tcca-enrolment-dialog:not(.tcca-success-mode)
.tcca-form-group {
    width: 100%;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .tcca-enrolment-dialog:not(.tcca-success-mode) {
        padding: 28px 20px;
    }

    .tcca-enrolment-dialog:not(.tcca-success-mode)
    .tcca-enrolment-header {
        padding-right: 45px;
    }

    .tcca-enrolment-dialog:not(.tcca-success-mode)
    .tcca-enrolment-header h2 {
        font-size: 26px !important;
    }

}
.tcca-enrolment-logo {
    width: 145px !important;
    margin: 0 auto 18px !important;
    display: block !important;
    text-align: center !important;
}

.tcca-enrolment-logo img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}