/* ══════════════════════════════════════
   Instant Courses – Step-based Flow
   ══════════════════════════════════════ */

/* Steps container */
.ic-step {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ── Step 1: Topic Input ── */
.ic-step-topic {
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #fff;
}

.ic-step-inner {
    max-width: 600px;
    width: 100%;
    position: relative;
}

.ic-topic-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    z-index: 1;
}

.ic-topic-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.ic-topic-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.ic-topic-header svg {
    flex-shrink: 0;
    color: #184db0;
}

.ic-topic-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.ic-topic-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #bfdbfe;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ic-topic-input::placeholder {
    color: #9ca3af;
}

.ic-topic-input:focus {
    border-color: #184db0;
}

.ic-topic-hint {
    font-size: 13px;
    color: #9ca3af;
    margin: 8px 0 24px;
}

.ic-topic-continue {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(to bottom, #2b69d1, #184db0);
    cursor: pointer;
    transition: opacity 0.2s;
}

.ic-topic-continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ic-topic-continue:not(:disabled):hover {
    opacity: 0.9;
}

/* ── Step 2: Generating ── */
.ic-step-generating {
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #fff;
}

.ic-gen-inner {
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.ic-gen-spinner {
    width: 56px;
    height: 56px;
    border: 5px solid #e5e7eb;
    border-top-color: #184db0;
    border-radius: 50%;
    animation: ic-spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

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

.ic-gen-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.ic-gen-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px;
}

.ic-gen-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ic-gen-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #2b69d1, #184db0);
    border-radius: 6px;
    transition: width 0.1s linear;
}

.ic-gen-pct {
    font-size: 14px;
    font-weight: 600;
    color: #184db0;
    margin: 0;
}

/* ── Step 3: Slider ── */
.ic-step-slider {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 576px) {
    .ic-step-topic,
    .ic-step-generating {
        padding: 24px 16px;
    }

    .ic-topic-header h2 {
        font-size: 18px;
    }
}
