/**
 * The MikroTik connector key card, styled to sit inside the YasnaMCP guide pages.
 * Colours fall back to the site's own custom properties when the guide shell is active.
 */

.ysmt-card {
    margin: 28px 0;
    padding: 30px;
    border: 1px solid var(--ymcp-line-strong, rgba(120, 160, 220, .22));
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(14, 28, 49, .95), rgba(6, 14, 27, .96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 26px 60px rgba(0, 0, 0, .28);
    color: var(--ymcp-text, #e7eef9);
}

.ysmt-card-notice {
    border-color: rgba(255, 196, 87, .3);
    background: rgba(255, 196, 87, .07);
}

.ysmt-kicker {
    display: inline-block;
    margin-bottom: 8px;
    padding: 6px 11px;
    border: 1px solid rgba(88, 228, 255, .26);
    border-radius: 999px;
    color: var(--ymcp-cyan, #58e4ff);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ysmt-head h3 {
    margin: 6px 0 10px;
    color: #fff;
    font-size: clamp(21px, 2.6vw, 27px);
    font-weight: 900;
    line-height: 1.5;
}

.ysmt-head p {
    margin: 0 0 22px;
    color: var(--ymcp-muted, #9fb0c8);
    font-size: 14px;
    line-height: 2;
}

.ysmt-form label {
    display: block;
    margin-bottom: 8px;
    color: #cfe0f5;
    font-size: 12px;
    font-weight: 800;
}

.ysmt-form .ysmt-second { margin-top: 18px; }

.ysmt-hint a { color: var(--ymcp-cyan, #58e4ff) !important; text-decoration: underline; }

.ysmt-input-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ysmt-input-row input {
    flex: 1 1 260px;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 13px;
    background: #050c17;
    color: #fff;
    font: inherit;
    font-size: 14px;
}

.ysmt-input-row input:focus {
    outline: none;
    border-color: rgba(88, 228, 255, .55);
    box-shadow: 0 0 0 3px rgba(88, 228, 255, .12);
}

.ysmt-button {
    height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(120deg, #58e4ff, #8af3d0);
    color: #04111b;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}

.ysmt-button:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.ysmt-button:disabled {
    cursor: progress;
    filter: saturate(.5);
}

.ysmt-hint {
    margin: 12px 0 0;
    color: #7f8da5;
    font-size: 11px;
    line-height: 1.9;
}

.ysmt-status {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.9;
}

.ysmt-status:empty {
    display: none;
}

.ysmt-status[data-tone="error"] {
    padding: 12px 14px;
    border: 1px solid rgba(255, 118, 118, .3);
    border-radius: 12px;
    background: rgba(255, 118, 118, .08);
    color: #ffc7c7;
}

.ysmt-status[data-tone="busy"] {
    color: var(--ymcp-cyan, #58e4ff);
}

.ysmt-result {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.ysmt-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ysmt-result-head strong {
    display: block;
    color: #fff;
    font-size: 17px;
}

.ysmt-badge {
    padding: 7px 12px;
    border: 1px solid rgba(138, 243, 208, .3);
    border-radius: 999px;
    color: #8af3d0;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.ysmt-steps {
    margin: 0 0 18px;
    padding-inline-start: 20px;
    color: #aebbd0;
    font-size: 13px;
    line-height: 2.1;
}

.ysmt-steps code,
.ysmt-card code {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(88, 228, 255, .1);
    color: #bff4ff;
    font-size: 12px;
    direction: ltr;
    display: inline-block;
}

.ysmt-code-wrap {
    position: relative;
}

.ysmt-code {
    margin: 0;
    padding: 18px 18px 54px;
    border: 1px solid rgba(88, 228, 255, .18);
    border-radius: 16px;
    background: #03080f;
    color: #d9ecff;
    font: 12px/2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 320px;
    overflow: auto;
}

.ysmt-copy {
    position: absolute;
    inset-inline-end: 14px;
    bottom: 14px;
    height: 34px;
    padding: 0 16px;
    border: 1px solid rgba(88, 228, 255, .35);
    border-radius: 10px;
    background: rgba(88, 228, 255, .1);
    color: #bff4ff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.ysmt-copy:hover {
    background: rgba(88, 228, 255, .18);
}

.ysmt-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.ysmt-downloads a {
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 11px;
    color: #cfe0f5 !important;
    font-size: 11px;
    text-decoration: none;
    background: rgba(255, 255, 255, .025);
}

.ysmt-downloads a:hover {
    border-color: rgba(88, 228, 255, .4);
    color: #fff !important;
}

@media (max-width: 640px) {
    .ysmt-card {
        padding: 20px;
        border-radius: 20px;
    }

    .ysmt-button {
        width: 100%;
    }
}
