/* CareerHike Multi-Step Form Styles */
:root {
    --chmsf-primary: #1a56db;
    --chmsf-secondary: #ff6b35;
    --chmsf-primary-dark: #1340b0;
    --chmsf-primary-light: #eff4ff;
    --chmsf-gradient: linear-gradient(135deg, #1a56db 0%, #7c3aed 100%);
    --chmsf-text: #1e293b;
    --chmsf-muted: #64748b;
    --chmsf-border: #e2e8f0;
    --chmsf-bg: #f8fafc;
    --chmsf-white: #ffffff;
    --chmsf-shadow: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.05);
    --chmsf-shadow-lg: 0 10px 25px -5px rgba(0,0,0,.12), 0 4px 6px -2px rgba(0,0,0,.06);
    --chmsf-radius: 12px;
    --chmsf-radius-lg: 20px;
}

.chmsf-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    max-width: 760px;
    margin: 32px auto;
    background: var(--chmsf-white);
    border-radius: var(--chmsf-radius-lg);
    box-shadow: var(--chmsf-shadow-lg);
    overflow: hidden;
    color: var(--chmsf-text);
}

/* Header */
.chmsf-header {
    background: var(--chmsf-gradient);
    padding: 36px 40px 28px;
    position: relative;
    overflow: hidden;
}
.chmsf-header::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
}
.chmsf-header::after {
    content: '';
    position: absolute;
    bottom: -40px; left: 30%;
    width: 150px; height: 150px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
}
.chmsf-form-title {
    color: #fff;
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 6px;
    position: relative; z-index: 1;
}
.chmsf-form-subtitle {
    color: rgba(255,255,255,.82);
    font-size: .95rem;
    margin: 0 0 24px;
    position: relative; z-index: 1;
}

/* Progress bar */
.chmsf-progress-bar {
    height: 5px;
    background: rgba(255,255,255,.25);
    border-radius: 99px;
    margin-bottom: 18px;
    position: relative; z-index: 1;
    overflow: hidden;
}
.chmsf-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 99px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
    width: 0%;
}

/* Steps indicator */
.chmsf-steps-indicator {
    display: flex;
    gap: 8px;
    position: relative; z-index: 1;
}
.chmsf-step-dot {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.65);
    font-size: .8rem;
    cursor: default;
}
.chmsf-step-dot-circle {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.4);
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 600;
    transition: all .3s ease;
    background: transparent;
}
.chmsf-step-dot.active .chmsf-step-dot-circle {
    background: #fff;
    color: var(--chmsf-primary);
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,.2);
}
.chmsf-step-dot.done .chmsf-step-dot-circle {
    background: rgba(255,255,255,.3);
    border-color: rgba(255,255,255,.7);
    color: #fff;
}
.chmsf-step-dot.active { color: #fff; }
.chmsf-step-dot-label { display: none; }
@media (min-width: 480px) { .chmsf-step-dot-label { display: inline; } }

/* Connector line */
.chmsf-step-connector {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,.25);
    align-self: center;
    border-radius: 99px;
    max-width: 32px;
    transition: background .3s ease;
}
.chmsf-step-connector.done { background: rgba(255,255,255,.65); }

/* Body */
.chmsf-body {
    padding: 36px 40px;
}

/* Step container */
.chmsf-step {
    display: none;
    animation: chmsf-slide-in .35s cubic-bezier(.4,0,.2,1);
}
.chmsf-step.active { display: block; }
.chmsf-step.slide-out { animation: chmsf-slide-out .25s cubic-bezier(.4,0,.2,1) forwards; }

@keyframes chmsf-slide-in {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes chmsf-slide-out {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-30px); }
}
@keyframes chmsf-slide-in-back {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
.chmsf-step.slide-in-back { animation: chmsf-slide-in-back .35s cubic-bezier(.4,0,.2,1); }

.chmsf-step-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--chmsf-text);
    margin: 0 0 6px;
}
.chmsf-step-desc {
    color: var(--chmsf-muted);
    font-size: .9rem;
    margin: 0 0 24px;
}

/* Option cards (step 1 – large selection) */
.chmsf-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.chmsf-option-card {
    border: 2px solid var(--chmsf-border);
    border-radius: var(--chmsf-radius);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    background: var(--chmsf-white);
    position: relative;
    user-select: none;
}
.chmsf-option-card:hover {
    border-color: var(--chmsf-primary);
    background: var(--chmsf-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26,86,219,.12);
}
.chmsf-option-card.selected {
    border-color: var(--chmsf-primary);
    background: var(--chmsf-primary-light);
    box-shadow: 0 0 0 4px rgba(26,86,219,.12);
}
.chmsf-option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px; right: 12px;
    width: 22px; height: 22px;
    background: var(--chmsf-primary);
    color: #fff;
    border-radius: 50%;
    font-size: .7rem;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.chmsf-option-icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
    display: block;
}
.chmsf-option-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--chmsf-text);
    display: block;
    margin-bottom: 6px;
}
.chmsf-option-desc {
    font-size: .8rem;
    color: var(--chmsf-muted);
}

/* Program grid (step 2 – compact) */
.chmsf-programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.chmsf-program-card {
    border: 2px solid var(--chmsf-border);
    border-radius: var(--chmsf-radius);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .22s ease;
    background: var(--chmsf-white);
    position: relative;
}
.chmsf-program-card:hover {
    border-color: var(--chmsf-primary);
    background: var(--chmsf-primary-light);
    transform: translateY(-2px);
}
.chmsf-program-card.selected {
    border-color: var(--chmsf-primary);
    background: var(--chmsf-primary-light);
}
.chmsf-program-card.selected::after {
    content: '✓';
    position: absolute;
    top: 6px; right: 8px;
    width: 18px; height: 18px;
    background: var(--chmsf-primary);
    color: #fff;
    border-radius: 50%;
    font-size: .65rem;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.chmsf-program-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
    display: block;
}
.chmsf-program-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--chmsf-text);
}

/* Loading skeleton */
.chmsf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px;
    color: var(--chmsf-muted);
    font-size: .9rem;
}
.chmsf-spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--chmsf-border);
    border-top-color: var(--chmsf-primary);
    border-radius: 50%;
    animation: chmsf-spin .7s linear infinite;
}
@keyframes chmsf-spin {
    to { transform: rotate(360deg); }
}

/* Form fields */
.chmsf-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}
.chmsf-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.chmsf-field-wrap.full { grid-column: 1 / -1; }

.chmsf-field-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--chmsf-text);
}
.chmsf-field-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.chmsf-input,
.chmsf-select,
.chmsf-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--chmsf-border);
    border-radius: 8px;
    font-size: .9rem;
    color: var(--chmsf-text);
    background: var(--chmsf-white);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}
.chmsf-input:focus,
.chmsf-select:focus,
.chmsf-textarea:focus {
    border-color: var(--chmsf-primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}
.chmsf-input.error,
.chmsf-select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}
.chmsf-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}
.chmsf-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.chmsf-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}
.chmsf-btn-primary {
    background: var(--chmsf-gradient);
    color: #fff;
    border: none;
    padding: 13px 32px;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.chmsf-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,86,219,.35);
}
.chmsf-btn-primary:active { transform: translateY(0); }
.chmsf-btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.chmsf-btn-secondary {
    background: transparent;
    color: var(--chmsf-muted);
    border: 1.5px solid var(--chmsf-border);
    padding: 11px 22px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.chmsf-btn-secondary:hover {
    border-color: var(--chmsf-primary);
    color: var(--chmsf-primary);
    background: var(--chmsf-primary-light);
}

/* Error banner */
.chmsf-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: .9rem;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chmsf-error::before { content: '⚠'; }

/* Success screen */
.chmsf-success {
    text-align: center;
    padding: 24px 0;
}
.chmsf-success-icon {
    width: 72px; height: 72px;
    background: var(--chmsf-gradient);
    color: #fff;
    border-radius: 50%;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(26,86,219,.3);
    animation: chmsf-pop .4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes chmsf-pop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.chmsf-success h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--chmsf-text);
}
.chmsf-success p {
    color: var(--chmsf-muted);
    margin: 0 0 24px;
    font-size: .95rem;
}

/* Selection summary badge */
.chmsf-selection-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.chmsf-badge {
    background: var(--chmsf-primary-light);
    color: var(--chmsf-primary);
    border: 1px solid rgba(26,86,219,.2);
    padding: 4px 12px;
    border-radius: 99px;
    font-size: .8rem;
    font-weight: 600;
}
.chmsf-badge-arrow {
    color: var(--chmsf-muted);
    font-size: .75rem;
}

/* Responsive */
@media (max-width: 600px) {
    .chmsf-header { padding: 28px 24px 20px; }
    .chmsf-body  { padding: 24px 20px; }
    .chmsf-form-title { font-size: 1.3rem; }
    .chmsf-fields-grid { grid-template-columns: 1fr; }
    .chmsf-field-wrap.full { grid-column: 1; }
    .chmsf-programs-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .chmsf-options-grid  { grid-template-columns: 1fr; }
    .chmsf-btn-primary  { padding: 12px 22px; width: 100%; justify-content: center; }
    .chmsf-actions { flex-direction: column-reverse; }
    .chmsf-btn-secondary { width: 100%; text-align: center; }
}
