/* ============================================================
   How To Create Telegram Bot modal — standalone overlay (not Tipsters.Modal).
   Mirror of TelegramPairing modal: same overlay color, same animation, same
   border radius / shadow. Flex column for truly fixed header + body scroll —
   scrollbar appears only beside content, not beside header.
   ============================================================ */

/* ---- Overlay ---- */
.bot-creation-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 22, 41, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999990;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 50px 16px;
    opacity: 0;
    transition: opacity 200ms ease;
}

.bot-creation-overlay.is-visible {
    opacity: 1;
}

/* ---- Modal box ---- */
.bot-creation-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(-12px);
    transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* Flex column = fixed header (flex-shrink: 0) + scrollable body (flex: 1, overflow-y: auto).
       max-height vázáno na viewport, takže scrollbar jede uvnitř modalu, ne přes celou obrazovku. */
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 100px);
    font-family: Montserrat, sans-serif;
    color: #2b3343;
}

.bot-creation-overlay.is-visible .bot-creation-modal {
    transform: translateY(0);
}

/* ---- Close button (X) ---- */
.bot-creation-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8c93a8;
    transition: background 150ms;
    z-index: 10;
}

.bot-creation-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #2b3343;
}

.bot-creation-modal-close svg {
    width: 18px !important;
    height: 18px !important;
}

/* ---- Header — fixed at top of modal (NOT sticky, no scroll) ---- */
.bot-creation-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 56px 18px 26px;     /* right padding ať se netriskne s close X */
    border-bottom: 1px solid #eef0f5;
    background: linear-gradient(135deg, rgba(36, 161, 222, 0.06) 0%, rgba(36, 161, 222, 0.0) 60%);
}

.bot-creation-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
    color: #fff;
    box-shadow: 0 8px 22px rgba(36, 161, 222, 0.35);
}

.bot-creation-header-icon svg {
    width: 26px !important;
    height: 26px !important;
    fill: #fff !important;
}

.bot-creation-header-text {
    min-width: 0;
    flex: 1;
}

.bot-creation-title {
    font-size: 22px;
    font-weight: 700;
    color: #2b3343;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.bot-creation-subtitle {
    font-size: 13px;
    color: #6c7390;
    font-weight: 300;
    line-height: 1.5;
}

.bot-creation-subtitle b {
    color: #2b3343;
    font-weight: 600;
}

/* ---- Body — scrollable inside modal (flex: 1 + overflow-y: auto) ---- */
.bot-creation-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;             /* DŮLEŽITÉ: bez tohohle flex child neumí scrollovat */
    -webkit-overflow-scrolling: touch;
}

.bot-creation-steps {
    padding: 22px 26px 28px;
    position: relative;
}

/* ---- Steps ---- */
.bot-creation-step {
    position: relative;
    display: flex;
    gap: 16px;
    padding-bottom: 28px;
    z-index: 1;
}

.bot-creation-step:last-child {
    padding-bottom: 0;
}

/* Kontinuální levá čára. Aplikuje se i na poslední step, který má rounded bottom. */
.bot-creation-step::after {
    content: '';
    position: absolute;
    left: 19px;
    top: 38px;
    bottom: 0;
    width: 2px;
    background: #eef0f5;
    z-index: 0;
}

.bot-creation-step:last-child::after {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.bot-creation-step-marker {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 0 0 4px rgba(34, 158, 217, 0.12), 0 6px 14px rgba(34, 158, 217, 0.25);
    position: relative;
    z-index: 2;
}

.bot-creation-step-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.bot-creation-step-title {
    font-size: 16px;
    font-weight: 600;
    color: #2b3343;
    margin-bottom: 6px;
}

.bot-creation-step-desc {
    font-size: 13px;
    color: #6c7390;
    line-height: 1.55;
    margin-bottom: 12px;
}

.bot-creation-step-desc b {
    color: #2b3343;
    font-weight: 600;
}

.bot-creation-step-desc code,
.bot-creation-step-then code {
    background: #f1f3f8;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', Consolas, Menlo, monospace;
    font-size: 12px;
    color: #1f6391;
    border: 1px solid #e3e7f0;
}

.bot-creation-step-then {
    font-size: 13px;
    color: #6c7390;
    line-height: 1.55;
    margin-top: 16px;
    margin-bottom: 12px;
}

.bot-creation-step-then b {
    color: #2b3343;
    font-weight: 600;
}

.bot-creation-step-img {
    display: block;
    width: 100%;
    max-width: 380px;
    border-radius: 10px;
    border: 1px solid #e3e7f0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    margin: 4px 0 0;
}

/* Warning callout */
.bot-creation-step-callout {
    margin-top: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.10) 0%, rgba(255, 184, 0, 0.02) 100%);
    border-left: 3px solid #ffb800;
    border-radius: 4px;
    font-size: 12px;
    color: #5a4500;
    line-height: 1.5;
}

.bot-creation-step-callout b {
    color: #2b3343;
}

/* Info note ("Why two URLs?") */
.bot-creation-step-note {
    margin: 12px 0 12px;
    padding: 10px 12px;
    background: rgba(34, 158, 217, 0.06);
    border-left: 3px solid #229ed9;
    border-radius: 4px;
    font-size: 12px;
    color: #44485a;
    line-height: 1.55;
}

.bot-creation-step-note b {
    color: #2b3343;
    font-weight: 600;
}

/* ---- Dark mode ---- */
html.is-dark .bot-creation-modal,
body.is-dark .bot-creation-modal {
    background: #1b2030;
    color: #e7eaf3;
}

html.is-dark .bot-creation-title,
body.is-dark .bot-creation-title,
html.is-dark .bot-creation-step-title,
body.is-dark .bot-creation-step-title {
    color: #e7eaf3;
}

html.is-dark .bot-creation-subtitle,
body.is-dark .bot-creation-subtitle,
html.is-dark .bot-creation-step-desc,
body.is-dark .bot-creation-step-desc,
html.is-dark .bot-creation-step-then,
body.is-dark .bot-creation-step-then {
    color: #9aa0b7;
}

html.is-dark .bot-creation-subtitle b,
body.is-dark .bot-creation-subtitle b,
html.is-dark .bot-creation-step-desc b,
body.is-dark .bot-creation-step-desc b,
html.is-dark .bot-creation-step-then b,
body.is-dark .bot-creation-step-then b {
    color: #e7eaf3;
}

html.is-dark .bot-creation-header,
body.is-dark .bot-creation-header {
    border-bottom-color: #2a3148;
    background: linear-gradient(135deg, rgba(36, 161, 222, 0.12) 0%, rgba(36, 161, 222, 0.0) 60%);
}

html.is-dark .bot-creation-modal-close,
body.is-dark .bot-creation-modal-close {
    color: #9aa0b7;
}

html.is-dark .bot-creation-modal-close:hover,
body.is-dark .bot-creation-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e7eaf3;
}

html.is-dark .bot-creation-step::after,
body.is-dark .bot-creation-step::after {
    background: #2a3148;
}

html.is-dark .bot-creation-step-desc code,
body.is-dark .bot-creation-step-desc code,
html.is-dark .bot-creation-step-then code,
body.is-dark .bot-creation-step-then code {
    background: #232a3e;
    border-color: #2a3148;
    color: #6abdee;
}

html.is-dark .bot-creation-step-img,
body.is-dark .bot-creation-step-img {
    border-color: #2a3148;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

html.is-dark .bot-creation-step-callout,
body.is-dark .bot-creation-step-callout {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.14) 0%, rgba(255, 184, 0, 0.02) 100%);
    color: #d4b878;
}

html.is-dark .bot-creation-step-callout b,
body.is-dark .bot-creation-step-callout b {
    color: #e7eaf3;
}

html.is-dark .bot-creation-step-note,
body.is-dark .bot-creation-step-note {
    background: rgba(34, 158, 217, 0.10);
    color: #9aa0b7;
}

html.is-dark .bot-creation-step-note b,
body.is-dark .bot-creation-step-note b {
    color: #e7eaf3;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    .bot-creation-overlay {
        padding: 16px 8px;
        align-items: stretch;
    }

    .bot-creation-modal {
        max-width: 100%;
        max-height: calc(100vh - 32px);
    }

    .bot-creation-header {
        padding: 18px 50px 14px 18px;
        gap: 12px;
    }

    .bot-creation-header-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .bot-creation-header-icon svg {
        width: 22px !important;
        height: 22px !important;
    }

    .bot-creation-title {
        font-size: 18px;
    }

    .bot-creation-subtitle {
        font-size: 12px;
    }

    .bot-creation-steps {
        padding: 18px 18px 22px;
    }
}
