/* ============================================================
   GFC Custom — improved form inputs, register multi-step & modals
   ============================================================ */

/* ── Legal Modal ── */
@keyframes gfcBackdropIn  { from { opacity:0 } to { opacity:1 } }
@keyframes gfcBackdropOut { from { opacity:1 } to { opacity:0 } }

@keyframes gfcModalIn {
    from { opacity:0; transform:translateY(40px) scale(.97); }
    to   { opacity:1; transform:translateY(0)    scale(1);   }
}
@keyframes gfcModalOut {
    from { opacity:1; transform:translateY(0)    scale(1);   }
    to   { opacity:0; transform:translateY(30px) scale(.97); }
}

.gfc-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10,12,22,.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: gfcBackdropIn .25s ease forwards;
}

.gfc-modal-backdrop.closing {
    animation: gfcBackdropOut .22s ease forwards;
}
.gfc-modal-backdrop.closing .gfc-modal-box {
    animation: gfcModalOut .22s cubic-bezier(.4,0,.6,1) forwards;
}

.gfc-modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,.22);
    animation: gfcModalIn .35s cubic-bezier(.22,.68,0,1.2) forwards;
    overflow: hidden;
}

/* Header */
.gfc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 32px 22px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.gfc-modal-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gfc-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fdf3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--thm-base);
    flex-shrink: 0;
}

.gfc-modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1c23;
    line-height: 1.2;
}

.gfc-modal-header p {
    margin: 3px 0 0;
    font-size: 12px;
    color: #999;
}

.gfc-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: #f5f5f7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.gfc-modal-close:hover { background: var(--thm-base); color: #fff; }

/* Body — scrollable */
.gfc-modal-body {
    overflow-y: auto;
    padding: 28px 32px;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}
.gfc-modal-body::-webkit-scrollbar       { width: 5px; }
.gfc-modal-body::-webkit-scrollbar-track { background: transparent; }
.gfc-modal-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* Content typography */
.gfc-modal-body h5 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1c23;
    margin: 22px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gfc-modal-body h5:first-child { margin-top: 0; }
.gfc-modal-body h5::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 14px;
    background: var(--thm-base);
    border-radius: 2px;
    flex-shrink: 0;
}

.gfc-modal-body p {
    font-size: 14px;
    color: #555;
    line-height: 1.75;
    margin: 0 0 10px;
}

.gfc-modal-body ul {
    margin: 0 0 12px;
    padding-left: 18px;
}
.gfc-modal-body ul li {
    font-size: 14px;
    color: #555;
    line-height: 1.75;
    margin-bottom: 4px;
}

.gfc-modal-divider {
    height: 1px;
    background: #f2f2f2;
    margin: 20px 0;
}

/* Footer */
.gfc-modal-footer {
    padding: 18px 32px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    background: #fafafa;
}

.gfc-modal-accept {
    padding: 11px 28px;
    border-radius: 7px;
    background: var(--thm-base);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.gfc-modal-accept:hover { opacity: .88; }

/* ── Variables shortcut ── */
:root {
    --gfc-radius: 8px;
    --gfc-border: #d9dde8;
    --gfc-border-focus: var(--thm-base);
    --gfc-shadow-focus: 0 0 0 3px rgba(207, 23, 60, 0.12);
    --gfc-label: #4a4e5a;
    --gfc-placeholder: #b0b5c3;
    --gfc-bg: #f8f9fc;
    --gfc-bg-focus: #ffffff;
    --gfc-text: #1a1c23;
}

/* ── Global input reset & restyle ── */
.contact-form form input[type="text"],
.contact-form form input[type="email"],
.contact-form form input[type="tel"],
.contact-form form input[type="password"],
.contact-form form input[type="date"],
.contact-form form input[type="number"],
.contact-form form textarea,
.default-form2 input[type="text"],
.default-form2 input[type="email"],
.default-form2 input[type="tel"],
.default-form2 input[type="password"],
.default-form2 input[type="date"],
.default-form2 input[type="number"],
.default-form2 textarea {
    background: var(--gfc-bg);
    border: 1.5px solid var(--gfc-border);
    border-radius: var(--gfc-radius) !important;
    height: 52px;
    padding-left: 16px;
    padding-right: 16px;
    color: var(--gfc-text);
    font-size: 15px;
    font-weight: 400;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    outline: none;
    width: 100%;
}

.contact-form form input[type="text"]:focus,
.contact-form form input[type="email"]:focus,
.contact-form form input[type="tel"]:focus,
.contact-form form input[type="password"]:focus,
.contact-form form input[type="date"]:focus,
.contact-form form input[type="number"]:focus,
.contact-form form textarea:focus,
.default-form2 input[type="text"]:focus,
.default-form2 input[type="email"]:focus,
.default-form2 input[type="tel"]:focus,
.default-form2 input[type="password"]:focus,
.default-form2 input[type="date"]:focus,
.default-form2 input[type="number"]:focus,
.default-form2 textarea:focus {
    background: var(--gfc-bg-focus);
    border-color: var(--gfc-border-focus) !important;
    box-shadow: var(--gfc-shadow-focus);
    outline: none;
}

/* Placeholder */
.default-form2 input::placeholder,
.contact-form form input::placeholder,
.default-form2 textarea::placeholder,
.contact-form form textarea::placeholder {
    color: var(--gfc-placeholder);
    font-size: 14px;
}

/* Labels */
.contact-form form .form-group label,
.default-form2 .form-group label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--gfc-label) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px !important;
    line-height: 1 !important;
}

/* Textarea */
.default-form2 textarea,
.contact-form form textarea {
    height: 120px !important;
    padding-top: 14px;
    padding-bottom: 14px;
    resize: vertical;
    border-radius: var(--gfc-radius) !important;
}

/* Date input */
.default-form2 input[type="date"] {
    color: var(--gfc-text);
}

/* ── Form-group spacing ── */
.default-form2 .form-group {
    margin-bottom: 20px;
}

/* ── Register multi-step ── */

/* Step indicator */
.gfc-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
}

.gfc-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.gfc-step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
    height: 2px;
    background: #e0e0e0;
    transition: background .4s;
}

.gfc-step-item.done:not(:last-child)::after,
.gfc-step-item.active:not(:last-child)::after {
    background: var(--thm-base);
}

.gfc-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #aaa;
    transition: all .3s;
    position: relative;
    z-index: 1;
}

.gfc-step-item.active .gfc-step-circle {
    border-color: var(--thm-base);
    background: var(--thm-base);
    color: #fff;
}

.gfc-step-item.done .gfc-step-circle {
    border-color: var(--thm-base);
    background: var(--thm-base);
    color: #fff;
}

.gfc-step-label {
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: color .3s;
}

.gfc-step-item.active .gfc-step-label,
.gfc-step-item.done .gfc-step-label {
    color: var(--thm-base);
}

/* Step panels */
.gfc-step-panel { display: none; }
.gfc-step-panel.active { display: block; }

/* Step nav buttons */
.gfc-step-nav {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.gfc-step-nav .btn-back {
    flex: 1;
    padding: 14px 24px;
    border-radius: var(--gfc-radius);
    border: 2px solid var(--gfc-border);
    background: transparent;
    color: var(--gfc-label);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.gfc-step-nav .btn-back:hover {
    border-color: var(--thm-base);
    color: var(--thm-base);
}

.gfc-step-nav .btn-next,
.gfc-step-nav .btn-submit {
    flex: 1;
}

.gfc-step-nav .btn-one {
    width: 100%;
    justify-content: center;
}

/* Account type cards */
.account-type-card {
    display: block;
    cursor: pointer;
    border: 2px solid var(--gfc-border);
    border-radius: var(--gfc-radius);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

.account-type-card input[type=radio] { display: none; }

.account-type-card:hover {
    border-color: var(--thm-base);
    box-shadow: var(--gfc-shadow-focus);
}

.account-type-card.selected {
    border-color: var(--thm-base);
    box-shadow: var(--gfc-shadow-focus);
}

.account-type-inner {
    padding: 28px 20px;
    text-align: center;
    background: #fff;
    transition: background .2s;
}

.account-type-card.selected .account-type-inner {
    background: #fdf3f5;
}

.account-type-inner h6 {
    margin: 14px 0 6px;
    font-weight: 700;
    font-size: 15px;
    color: var(--gfc-text);
}

.account-type-inner p {
    margin: 0;
    font-size: 13px;
    color: #888;
    line-height: 1.5;
}

/* Progress bar */
.gfc-progress-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin-bottom: 36px;
    overflow: hidden;
}

.gfc-progress-fill {
    height: 100%;
    background: var(--thm-base);
    border-radius: 2px;
    transition: width .4s ease;
}

/* Error inline */
.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}
