.isf-form-container {
    --isf-front-ink: #162033;
    --isf-front-muted: #667085;
    --isf-front-line: #d8e1ec;
    --isf-front-soft: #f7fafc;
    --isf-front-teal: #0f766e;
    --isf-front-teal-dark: #115e59;
    --isf-front-indigo: #4f46e5;
    --isf-front-danger: #b42318;
    --isf-front-success: #067647;
    max-width: 760px;
    margin: 28px 0;
    color: var(--isf-front-ink);
}

.isf-form-title {
    color: var(--isf-front-ink);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.18;
    margin-bottom: 8px;
}

.isf-form-description {
    color: var(--isf-front-muted);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.isf-form {
    background: #ffffff;
    border: 1px solid var(--isf-front-line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(22, 32, 51, 0.08);
    display: grid;
    gap: 18px;
    padding: clamp(18px, 3vw, 28px);
    position: relative;
    overflow: hidden;
    animation: isf-fade-in 300ms ease both;
}

.isf-form::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--isf-front-teal), var(--isf-front-indigo), #f59e0b);
}

.isf-field-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.isf-field {
    width: 100%;
}

.isf-field.half,
.isf-field.isf-width-half {
    width: calc(50% - 9px);
}

.isf-field.third,
.isf-field.isf-width-third {
    width: calc(33.333% - 12px);
}

.isf-field label {
    color: var(--isf-front-ink);
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.isf-field-text,
.isf-field-email,
.isf-field-phone,
.isf-field-url,
.isf-field-password,
.isf-field-number,
.isf-field-textarea {
    position: relative;
}

.isf-field-text > label,
.isf-field-email > label,
.isf-field-phone > label,
.isf-field-url > label,
.isf-field-password > label,
.isf-field-number > label,
.isf-field-textarea > label {
    background: #ffffff;
    color: var(--isf-front-muted);
    left: 12px;
    padding: 0 4px;
    pointer-events: none;
    position: absolute;
    top: 12px;
    transform-origin: left top;
    transition: transform 160ms ease, color 160ms ease;
    z-index: 1;
}

.isf-field-text:focus-within > label,
.isf-field-email:focus-within > label,
.isf-field-phone:focus-within > label,
.isf-field-url:focus-within > label,
.isf-field-password:focus-within > label,
.isf-field-number:focus-within > label,
.isf-field-textarea:focus-within > label,
.isf-field-text:has(input:not(:placeholder-shown)) > label,
.isf-field-email:has(input:not(:placeholder-shown)) > label,
.isf-field-phone:has(input:not(:placeholder-shown)) > label,
.isf-field-url:has(input:not(:placeholder-shown)) > label,
.isf-field-password:has(input:not(:placeholder-shown)) > label,
.isf-field-number:has(input:not(:placeholder-shown)) > label,
.isf-field-textarea:has(textarea:not(:placeholder-shown)) > label {
    color: var(--isf-front-teal-dark);
    transform: translateY(-22px) scale(0.82);
}

.isf-field-email::before,
.isf-field-phone::before,
.isf-field-url::before {
    color: var(--isf-front-muted);
    font-family: dashicons;
    font-size: 18px;
    left: 12px;
    position: absolute;
    top: 38px;
    z-index: 1;
}

.isf-field-email::before {
    content: "\f465";
}

.isf-field-phone::before {
    content: "\f525";
}

.isf-field-url::before {
    content: "\f103";
}

.isf-field-email input,
.isf-field-phone input,
.isf-field-url input {
    padding-left: 40px !important;
}

.isf-field input[type="text"],
.isf-field input[type="email"],
.isf-field input[type="number"],
.isf-field input[type="url"],
.isf-field input[type="password"],
.isf-field input[type="tel"],
.isf-field input[type="date"],
.isf-field input[type="time"],
.isf-field input[type="datetime-local"],
.isf-field input[type="file"],
.isf-field select,
.isf-field textarea {
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border: 1px solid var(--isf-front-line);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(22, 32, 51, 0.04);
    color: var(--isf-front-ink);
    font-size: 16px;
    min-height: 44px;
    padding: 11px 12px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.isf-field input[type="text"]:focus,
.isf-field input[type="email"]:focus,
.isf-field input[type="number"]:focus,
.isf-field input[type="url"]:focus,
.isf-field input[type="password"]:focus,
.isf-field input[type="tel"]:focus,
.isf-field input[type="date"]:focus,
.isf-field input[type="time"]:focus,
.isf-field input[type="datetime-local"]:focus,
.isf-field input[type="file"]:focus,
.isf-field select:focus,
.isf-field textarea:focus {
    background: #fbfffe;
    border-color: var(--isf-front-teal);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    outline: none;
}

.isf-field textarea {
    min-height: 120px;
}

.isf-field .description {
    color: var(--isf-front-muted);
    font-size: 0.92em;
    margin: 6px 0 0;
}

.isf-required,
.isf-field-error {
    color: var(--isf-front-danger);
}

.isf-field-error,
.isf-form-error {
    margin: 8px 0 0;
}

.isf-form-error,
.isf-form-success {
    border-radius: 6px;
    font-weight: 600;
    padding: 13px 14px;
}

.isf-form-error {
    background: #fff4f2;
    border: 1px solid #fecdca;
    color: var(--isf-front-danger);
}

.isf-form-success {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: var(--isf-front-success);
}

.isf-hidden-label,
.isf-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.isf-submit-button[disabled] {
    opacity: 0.7;
    cursor: wait;
}

.isf-step-nav {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.isf-step-nav span {
    color: var(--isf-front-muted);
    font-weight: 700;
}

.isf-save-resume-button {
    width: fit-content;
}

.isf-submit-button {
    align-items: center;
    background: var(--isf-front-teal);
    border: 1px solid var(--isf-front-teal-dark);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 16px;
    font-weight: 700;
    justify-content: center;
    min-height: 46px;
    padding: 10px 18px;
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
    width: fit-content;
}

.isf-submit-button:hover,
.isf-submit-button:focus {
    background: var(--isf-front-teal-dark);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18);
    color: #ffffff;
    transform: translateY(-1px);
}

.isf-field input[type="checkbox"],
.isf-field input[type="radio"] {
    accent-color: var(--isf-front-teal);
}

.isf-field input[readonly],
.isf-field textarea[readonly] {
    background: var(--isf-front-soft);
    color: var(--isf-front-muted);
}

.isf-field [aria-invalid="true"] {
    animation: isf-shake 400ms ease;
    border-color: var(--isf-front-danger) !important;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12) !important;
}

.isf-character-counter,
.isf-file-name,
.isf-range-output {
    color: var(--isf-front-muted);
    display: block;
    font-size: 13px;
    margin: 6px 0 0;
}

.isf-range-output {
    color: var(--isf-front-teal-dark);
    font-weight: 700;
}

.isf-password-toggle {
    background: transparent;
    border: 0;
    color: var(--isf-front-teal-dark);
    cursor: pointer;
    font-weight: 700;
    margin-top: 6px;
    padding: 0;
}

.isf-password-toggle:hover,
.isf-password-toggle:focus {
    text-decoration: underline;
}

.isf-progress {
    background: #e7eef6;
    border-radius: 999px;
    height: 10px;
    overflow: visible;
    position: relative;
}

.isf-progress span {
    background: linear-gradient(90deg, var(--isf-front-teal), var(--isf-front-indigo));
    border-radius: inherit;
    display: block;
    height: 100%;
    transition: width 0.18s ease;
    width: 0;
}

.isf-progress strong {
    color: var(--isf-front-muted);
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
}

.isf-submit-button.isf-is-submitting::before {
    animation: isf-spin 700ms linear infinite;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    content: "";
    height: 16px;
    margin-right: 8px;
    width: 16px;
}

@keyframes isf-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes isf-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes isf-shake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-4px);
    }
    40%, 80% {
        transform: translateX(4px);
    }
}

.isf-conditionally-hidden {
    display: none !important;
}

@media (max-width: 640px) {
    .isf-field.half,
    .isf-field.third,
    .isf-field.isf-width-half,
    .isf-field.isf-width-third {
        width: 100%;
    }
}

.isf-preview-body {
    background: #f3f7f6;
    margin: 0;
}

.isf-preview-shell {
    max-width: 860px;
    margin: 32px auto;
    background: #fff;
    border: 1px solid var(--isf-front-line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(22, 32, 51, 0.08);
    padding: 24px;
}

.isf-preview-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--isf-front-line);
    margin-bottom: 20px;
    padding-bottom: 14px;
}

@media (max-width: 480px) {
    .isf-form {
        padding: 16px;
    }

    .isf-submit-button {
        width: 100%;
    }
}
