/* ===========================
   MPS Easy — Enquiry Page
   =========================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --purple: #7B2D8E;
    --purple-dark: #5A1D6B;
    --purple-deeper: #3A1050;
    --yellow: #F5C518;
    --yellow-hover: #FFD740;
    --cyan: #00BCD4;
    --cyan-dark: #0097A7;
    --red: #E53935;
    --white: #FFFFFF;
    --off-white: #F5F6FA;
    --surface: #FAFAFD;
    --border: #E2E5F0;
    --border-focus: #7B2D8E;
    --text-h: #1A1230;
    --text-body: #4A4462;
    --text-muted: #9898B8;
    --text-label: #3D3756;
    --section-bg: #FCFCFF;
    --shadow-card: 0 24px 72px rgba(90, 29, 107, .12), 0 4px 20px rgba(0, 0, 0, .06);
    --shadow-hover: 0 4px 16px rgba(123, 45, 142, .12);
    --transition: .22s cubic-bezier(.4, 0, .2, 1);
    --radius-card: 20px;
    --radius-input: 10px;
    --radius-btn: 50px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--off-white);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(123, 45, 142, .05) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(245, 197, 24, .06) 0%, transparent 50%);
}

/* ===========================
   HEADER
   =========================== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo img {
    height: 36px;
    display: block;
}

.logo-fb {
    display: none;
    align-items: center;
    font-weight: 800;
    font-size: 1.3rem;
}

.fb-mps {
    color: var(--purple);
}

.fb-easy {
    color: var(--text-h);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    color: var(--purple);
    padding: 8px 16px;
    border: 1.5px solid var(--border-focus);
    border-radius: var(--radius-btn);
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--purple);
    color: var(--white);
}

.btn-back .material-icons-outlined {
    font-size: 16px;
}

/* ===========================
   MAIN / CARD
   =========================== */
.page-main {
    flex: 1;
    padding: 36px 24px 60px;
    display: flex;
    justify-content: center;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 960px;
    overflow: hidden;
    animation: cardIn .6s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   CARD HEADER
   =========================== */
.card-header {
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deeper) 100%);
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 50px solid rgba(255, 255, 255, .04);
    top: -80px;
    right: -80px;
    pointer-events: none;
}

.card-header::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(245, 197, 24, .07);
    bottom: -40px;
    left: 20%;
    pointer-events: none;
}

.card-header-left {
    position: relative;
    z-index: 1;
}

.header-tag {
    display: inline-block;
    background: var(--yellow);
    color: var(--text-h);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: 1.8px;
    padding: 4px 14px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.card-header-left h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 6px;
    letter-spacing: -.02em;
}

.card-header-left p {
    font-size: .85rem;
    color: rgba(255, 255, 255, .72);
    font-weight: 400;
}

.card-header-left p .req {
    color: var(--yellow);
    font-weight: 700;
}

.card-logo {
    height: 44px;
    filter: brightness(1.2) drop-shadow(0 2px 8px rgba(0, 0, 0, .2));
    position: relative;
    z-index: 1;
}

/* ===========================
   FORM SECTIONS
   =========================== */
#enquiryForm {
    padding: 36px 40px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-section {
    background: var(--section-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 28px 24px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    animation: fadeUp .4s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section:nth-child(1) {
    animation-delay: .05s;
}

.form-section:nth-child(2) {
    animation-delay: .10s;
}

.form-section:nth-child(3) {
    animation-delay: .15s;
}

.form-section:nth-child(4) {
    animation-delay: .20s;
}

.form-section:nth-child(5) {
    animation-delay: .25s;
}

/* Section Label */
.section-label {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.section-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: var(--white);
    font-size: .7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-label span:last-child {
    font-size: .82rem;
    font-weight: 700;
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.full-width {
    grid-column: 1 / -1;
}

/* ===========================
   FIELD GROUP
   =========================== */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field-group label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-label);
    letter-spacing: .02em;
}

.req {
    color: var(--purple);
    font-weight: 700;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-input);
    transition: var(--transition);
    overflow: hidden;
}

.input-wrap:hover {
    border-color: #C5B0D8;
}

.field-group.active .input-wrap {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(123, 45, 142, .09);
}

.field-group.error .input-wrap {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, .07);
}

.i-icon {
    position: absolute;
    left: 12px;
    font-size: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.field-group.active .i-icon {
    color: var(--purple);
}

.input-wrap input,
.input-wrap select {
    flex: 1;
    padding: 12px 12px 12px 40px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: .88rem;
    color: var(--text-h);
    background: transparent;
    width: 100%;
}

.input-wrap input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Select */
.select-wrap {
    position: relative;
}

.input-wrap select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 10px;
    color: var(--text-muted);
    font-size: 20px;
    pointer-events: none;
}

/* Error message */
.err-msg {
    font-size: .72rem;
    color: var(--red);
    font-weight: 500;
    display: none;
}

.field-group.error .err-msg {
    display: block;
}

/* ===========================
   RADIO CARDS (Member Type)
   =========================== */
.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-card {
    flex: 1;
    min-width: 130px;
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    background: var(--white);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-visual {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
}

.radio-card.selected .radio-visual {
    border-color: var(--purple);
    background: var(--purple);
    box-shadow: inset 0 0 0 3px var(--white);
}

.radio-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-body);
    transition: var(--transition);
}

.radio-text .material-icons-outlined {
    font-size: 16px;
    color: var(--text-muted);
}

.radio-card:hover {
    border-color: #C5B0D8;
    background: #FAF5FF;
}

.radio-card.selected {
    border-color: var(--purple);
    background: #F7F0FC;
    box-shadow: 0 0 0 3px rgba(123, 45, 142, .08);
}

.radio-card.selected .radio-text {
    color: var(--purple);
}

.radio-card.selected .radio-text .material-icons-outlined {
    color: var(--purple);
}

/* ===========================
   TOGGLE GROUP (Yes / No)
   =========================== */
.toggle-group {
    display: inline-flex;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: calculate(var(--radius-btn));
    border-radius: 50px;
    overflow: hidden;
    width: fit-content;
    background: var(--off-white);
}

.toggle-option {
    display: flex;
}

.toggle-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-btn {
    display: block;
    padding: 9px 28px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.toggle-option.selected .toggle-btn {
    background: var(--purple);
    color: var(--white);
}

/* ===========================
   CAPTCHA
   =========================== */
.captcha-section {
    grid-template-columns: auto 1fr;
}

.captcha-block {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.captcha-image-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#captchaCanvas {
    border-radius: 10px;
    border: 1.5px solid var(--border);
    display: block;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, .06);
    user-select: none;
}

.captcha-refresh {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    font-size: .74rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.captcha-refresh:hover {
    border-color: var(--purple);
    color: var(--purple);
}

.captcha-refresh .material-icons-outlined {
    font-size: 15px;
}

.captcha-input-wrap {
    min-width: 220px;
}

/* ===========================
   FORM ACTIONS
   =========================== */
.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    padding: 20px 40px 36px;
    border-top: 1px solid var(--border);
    margin: 0 -40px;
    padding-left: 40px;
    background: var(--surface);
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-btn);
    font-family: inherit;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset:hover {
    border-color: var(--red);
    color: var(--red);
}

.btn-reset .material-icons-outlined {
    font-size: 18px;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    background: linear-gradient(135deg, var(--yellow), var(--yellow-hover));
    border: none;
    border-radius: var(--radius-btn);
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-h);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 18px rgba(245, 197, 24, .40);
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .3) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform .5s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(245, 197, 24, .5);
}

.btn-submit:hover::after {
    transform: translateX(100%);
}

.btn-submit .material-icons-outlined {
    font-size: 18px;
}

/* Loading */
.btn-submit.loading {
    pointer-events: none;
    opacity: .8;
}

.btn-submit.loading .btn-label,
.btn-submit.loading .material-icons-outlined {
    visibility: hidden;
}

.btn-submit.loading::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(26, 18, 48, .15);
    border-top-color: var(--text-h);
    border-radius: 50%;
    animation: spin .65s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   SUCCESS MODAL
   =========================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 18, 48, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--white);
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 72px rgba(0, 0, 0, .2);
    transform: translateY(20px) scale(.96);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}

.modal-overlay.show .modal-box {
    transform: translateY(0) scale(1);
}

.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-icon .material-icons-outlined {
    font-size: 38px;
    color: #2E7D32;
}

.modal-box h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-h);
    margin-bottom: 10px;
}

.modal-box p {
    font-size: .88rem;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 28px;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-btn);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(90, 29, 107, .3);
}

.modal-btn .material-icons-outlined {
    font-size: 18px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .card-header {
        padding: 28px 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .card-logo {
        height: 34px;
    }

    .card-header-left h1 {
        font-size: 1.5rem;
    }

    #enquiryForm {
        padding: 24px 20px 16px;
    }

    .form-section {
        grid-template-columns: 1fr;
        padding: 20px 16px;
    }

    .form-actions {
        padding: 16px 20px 28px;
        margin: 0 -20px;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-card {
        min-width: unset;
    }

    .captcha-block {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .form-actions {
        flex-direction: column-reverse;
    }

    .btn-submit,
    .btn-reset {
        width: 100%;
        justify-content: center;
    }

    .header-inner {
        padding: 12px 16px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 3px;
}

::selection {
    background: var(--purple);
    color: white;
}