/* YouStable One-Click Apps — cart section + client area card. Matches the YouStable configure / product-details design. */
.ys-ad, .ys-ad-client {
    --ys-accent: #5b3bd6;
    --ys-accent-dark: #4a2ec0;
    --ys-accent-bg: #f4f2fe;
    --ys-border: #e6e6ee;
    --ys-text: #16161f;
    --ys-muted: #6b6e7d;
    --ys-ok: #1e8e4b;
    --ys-ok-bg: #dcf5e5;
    --ys-bad: #c5221f;
    --ys-bad-bg: #fdecec;
    --ys-warn: #a35a00;
    --ys-warn-bg: #fff6e6;
}

/* ---------------------------------------------------------------- Cart section */
.ys-ad {
    margin: 0 0 24px;
    padding: 22px 22px 24px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(22, 22, 31, .04);
    color: var(--ys-text);
    width: 100%;
    box-sizing: border-box;
    clear: both;
}
.ys-ad.is-embedded { margin: 0; padding: 0; box-shadow: none; background: none; }
.ys-ad.is-embedded .ys-ad-head, .ys-ad.is-embedded .ys-ad-sub { display: none; }
.ys-ad *, .ys-ad *::before, .ys-ad *::after { box-sizing: border-box; }

.ys-ad-head { display: flex; align-items: center; gap: 10px; }
.ys-ad .ys-ad-title { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0; color: var(--ys-text); }
.ys-ad-free {
    padding: 2px 10px; border-radius: 999px; background: var(--ys-ok-bg); color: var(--ys-ok);
    font-size: 12px; font-weight: 600; line-height: 1.6;
}
.ys-ad .ys-ad-sub {
    margin: 6px 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--ys-border);
    color: var(--ys-muted); font-size: 13.5px; line-height: 1.5;
}

/* Two equal cards per row; one per row only on very small phones. */
.ys-ad { container-type: inline-size; }
.ys-ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@container (max-width: 340px) { .ys-ad-grid { grid-template-columns: 1fr; } }
@media (max-width: 575px) { .ys-ad { padding: 18px 16px 20px; } }

.ys-ad .ys-ad-card {
    -webkit-appearance: none; appearance: none;
    display: flex; align-items: center; gap: 12px;
    width: 100%; min-width: 0; min-height: 80px; margin: 0; padding: 14px;
    border: 1px solid var(--ys-border); border-radius: 8px;
    background: #fff; color: inherit; box-shadow: none;
    font: inherit; font-size: 14px; line-height: 1.35; text-align: left; text-transform: none;
    letter-spacing: normal; white-space: normal; cursor: pointer;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.ys-ad .ys-ad-card:hover:not(:disabled) { border-color: #c9c1f3; }
.ys-ad .ys-ad-card:focus { outline: none; }
.ys-ad .ys-ad-card:focus-visible { outline: 2px solid var(--ys-accent); outline-offset: 2px; }
.ys-ad .ys-ad-card.is-selected { border-color: #4f3cc9; background: #f7f8ff; }
.ys-ad .ys-ad-card.is-disabled { opacity: .55; cursor: not-allowed; }

/* Reset anything a theme may put on spans inside buttons. */
.ys-ad .ys-ad-card :where(span) { border: 0; outline: 0; padding: 0; margin: 0; background: none; box-shadow: none; float: none; }

.ys-ad .ys-ad-card .ys-ad-icon {
    flex: 0 0 40px; width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 12px; overflow: hidden;
}
.ys-ad .ys-ad-card .ys-ad-icon img { width: 36px; height: 36px; object-fit: contain; }
.ys-ad .ys-ad-card .ys-ad-icon.is-badge { border-radius: 50%; }
.ys-ad .ys-ad-card .ys-ad-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ys-ad .ys-ad-card .ys-ad-name {
    font-size: 15px; font-weight: 600; line-height: 1.3; color: #222431;
    white-space: normal; word-break: normal; overflow-wrap: normal;
}
.ys-ad .ys-ad-card .ys-ad-desc {
    font-size: 12.5px; color: var(--ys-muted); line-height: 1.35;
    white-space: normal; word-break: normal; overflow-wrap: normal;
}
.ys-ad .ys-ad-card .ys-ad-radio {
    flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%;
    border: 1.5px solid #b9bcc6; position: relative; background: #fff;
}
.ys-ad .ys-ad-card.is-selected .ys-ad-radio { border: 1.5px solid #4f3cc9; }
.ys-ad .ys-ad-card.is-selected .ys-ad-radio::after {
    content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #4f3cc9;
}

.ys-ad .ys-ad-more {
    display: block; margin: 14px auto 0; padding: 6px 14px; border: 0; border-radius: 999px; background: none;
    color: var(--ys-accent); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.ys-ad .ys-ad-more:hover { background: var(--ys-accent-bg); }

.ys-ad-note {
    display: flex; align-items: flex-start; gap: 10px;
    margin-top: 14px; padding: 12px 14px; border-radius: 8px; border-left: 3px solid var(--ys-accent);
    background: var(--ys-accent-bg); color: var(--ys-text); font-size: 13px; line-height: 1.5;
}
.ys-ad-note svg {
    flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; color: var(--ys-accent);
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.ys-ad-note > span { flex: 1 1 auto; }
.ys-ad .ys-ad-clear {
    flex: 0 0 auto; padding: 0; border: 0; background: none; color: var(--ys-accent);
    font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer;
}
.ys-ad-note.is-warn { border-left-color: #e08a00; background: var(--ys-warn-bg); }
.ys-ad-note.is-warn svg { color: #e08a00; }

/* Domain field (styled like the Configure Server inputs). */
.ys-ad .ys-ad-domain { margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--ys-border); max-width: none; }
.ys-ad .ys-ad-domain label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--ys-text); }
.ys-ad .ys-ad-domain input {
    width: 100%; max-width: 480px; height: 44px; padding: 10px 14px;
    border: 1px solid var(--ys-border); border-radius: 8px; background: #fff; box-shadow: none;
    font-size: 14px; color: var(--ys-text);
}
.ys-ad .ys-ad-domain input:focus { outline: none; border-color: var(--ys-accent); box-shadow: 0 0 0 3px rgba(91, 59, 214, .12); }
.ys-ad-domain-help { font-size: 12.5px; color: var(--ys-muted); margin: 8px 0 0; max-width: 640px; }
.ys-ad-domain-help:empty { display: none; }

/* ---------------------------------------------------------------- Client area card */
.ys-ad-client { margin-bottom: 24px; }
.ys-ad-client *, .ys-ad-client *::before, .ys-ad-client *::after { box-sizing: border-box; }
.ys-adc {
    border-radius: 14px; background: #fff; color: var(--ys-text);
    box-shadow: 0 1px 2px rgba(22, 22, 31, .04); overflow: hidden;
}
.ys-adc-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--ys-border); }
.ys-adc-icon {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; background: #f3f2f7;
    display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
    color: #fff; font-size: 13px; font-weight: 700;
}
.ys-adc-icon img { width: 28px; height: 28px; object-fit: contain; }
.ys-adc-icon.is-badge { border-radius: 50%; }
.ys-adc-titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ys-ad-client .ys-adc-title { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ys-text); }
.ys-adc-kicker { font-size: 12.5px; color: var(--ys-muted); }

.ys-adc-pill {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
    padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.4;
}
.ys-adc-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ys-adc-pill.is-ok { background: var(--ys-ok-bg); color: var(--ys-ok); }
.ys-adc-pill.is-bad { background: var(--ys-bad-bg); color: var(--ys-bad); }
.ys-adc-pill.is-busy { background: var(--ys-accent-bg); color: var(--ys-accent); }
.ys-adc-pill.is-busy::before { animation: ys-adc-pulse 1.2s ease-in-out infinite; }
.ys-adc-pill.is-wait { background: #f1f1f5; color: var(--ys-muted); }
@keyframes ys-adc-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .ys-adc-pill.is-busy::before { animation: none; } }

.ys-adc-body { padding: 20px 22px 22px; }

/* Stepper: dots joined by a line, labels underneath. */
.ys-adc-steps { display: flex; list-style: none; margin: 0 0 18px; padding: 0; }
.ys-adc-steps li { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ys-adc-steps li::before {
    content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--ys-border);
}
.ys-adc-steps li:first-child::before { display: none; }
.ys-adc-steps li.done::before, .ys-adc-steps li.current::before { background: var(--ys-accent); }
.ys-adc-dot {
    position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid #c9cbd4; background: #fff;
}
.ys-adc-steps li.done .ys-adc-dot { border-color: var(--ys-accent); background: var(--ys-accent); }
.ys-adc-steps li.done .ys-adc-dot::after {
    content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 5px; height: 9px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.ys-adc-steps li.current .ys-adc-dot { border-color: var(--ys-accent); box-shadow: 0 0 0 4px var(--ys-accent-bg); }
.ys-adc-steps li.current .ys-adc-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--ys-accent); }
.ys-adc-step-label { font-size: 12.5px; color: var(--ys-muted); }
.ys-adc-steps li.done .ys-adc-step-label { color: var(--ys-text); }
.ys-adc-steps li.current .ys-adc-step-label { color: var(--ys-accent); font-weight: 600; }
@media (max-width: 575px) { .ys-adc-step-label { font-size: 11px; } }

.ys-adc-current { margin: 0 0 4px; font-weight: 600; font-size: 14px; }
.ys-ad-client .ys-adc-muted { margin: 8px 0 0; font-size: 13px; color: var(--ys-muted); }

/* Label / value rows like "Server Information". */
.ys-adc-rows { border: 1px solid var(--ys-border); border-radius: 10px; overflow: hidden; }
.ys-adc-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--ys-border); }
.ys-adc-row:first-child { border-top: 0; }
.ys-adc-label { font-size: 13.5px; color: var(--ys-muted); text-transform: capitalize; }
.ys-adc-value { font-size: 14px; color: var(--ys-text); min-width: 0; overflow-wrap: anywhere; }
.ys-adc-value a { color: var(--ys-accent); }
@media (max-width: 575px) { .ys-adc-row { grid-template-columns: 1fr; gap: 4px; } }

.ys-adc-secret { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ys-adc-secret code { padding: 2px 8px; border-radius: 6px; background: #f3f2f7; color: var(--ys-text); font-size: 13px; word-break: break-all; }
.ys-ad-client .ys-adc-copy {
    padding: 2px 10px; border: 1px solid var(--ys-border); border-radius: 6px; background: #fff;
    color: var(--ys-accent); font-size: 12px; font-weight: 600; cursor: pointer;
}
.ys-adc-secrets:not(:empty) { margin-top: 16px; }

.ys-adc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ys-adc-actions:empty { display: none; }
.ys-ad-client .ys-adc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 10px 18px; border: 1px solid var(--ys-accent); border-radius: 8px;
    background: var(--ys-accent); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.2;
    text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s;
}
.ys-ad-client .ys-adc-btn:hover { background: var(--ys-accent-dark); border-color: var(--ys-accent-dark); color: #fff; text-decoration: none; }
.ys-ad-client .ys-adc-btn.is-outline { background: #fff; color: var(--ys-accent); }
.ys-ad-client .ys-adc-btn.is-outline:hover { background: var(--ys-accent-bg); color: var(--ys-accent); }
.ys-ad-client .ys-adc-btn:disabled { opacity: .6; cursor: wait; }
.ys-ad-client .ys-adc-btn:focus-visible, .ys-ad-client .ys-adc-copy:focus-visible { outline: 2px solid var(--ys-accent); outline-offset: 2px; }

.ys-adc-alert { padding: 12px 14px; border-radius: 8px; border-left: 3px solid; font-size: 13.5px; line-height: 1.5; }
.ys-adc-alert.is-bad { border-color: var(--ys-bad); background: var(--ys-bad-bg); color: #8c1a17; }
.ys-adc-alert.is-ok { border-color: var(--ys-ok); background: var(--ys-ok-bg); color: #145c32; }
.ys-adc-alert.is-wait { border-color: #e08a00; background: var(--ys-warn-bg); color: #6e3d00; }

/* Connect a domain */
.ys-adc-domain { margin-top: 6px; }
.ys-adc-domain p { margin: 10px 0; font-size: 13.5px; line-height: 1.55; color: var(--ys-text); }
.ys-adc-domain .ys-adc-muted { color: var(--ys-muted); }
.ys-adc-domain .ys-adc-alert { margin-top: 12px; }
.ys-adc-dns { margin-top: 12px; }
.ys-adc-dns .ys-adc-rows { margin: 8px 0; }
.ys-adc-tips { margin: 8px 0; padding-left: 20px; font-size: 13px; line-height: 1.55; color: var(--ys-muted); }
.ys-adc-tips li { margin-bottom: 4px; }
.ys-adc-domain-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.ys-ad-client .ys-adc-input {
    flex: 1 1 240px; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--ys-border); border-radius: 8px;
    font-size: 14px; color: var(--ys-text); background: #fff;
}
.ys-ad-client .ys-adc-input:focus { outline: none; border-color: var(--ys-accent); box-shadow: 0 0 0 3px rgba(91, 59, 214, .12); }

.ys-ad-client .ys-adc-subtitle { margin: 22px 0 10px; font-size: 15px; font-weight: 600; color: var(--ys-text); }
.ys-adc-instructions { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; color: var(--ys-text); }
.ys-adc-instructions li { margin-bottom: 8px; padding-left: 4px; }

.ys-adc-foot { padding: 12px 22px; border-top: 1px solid var(--ys-border); background: #fafafc; font-size: 12.5px; color: var(--ys-muted); }
