/*
 * Tech Seven Downtime Calculator - Frontend styles
 * All selectors are scoped under .t7dc-wrap to avoid leaking into the host theme.
 * Fonts are intentionally inherited from the active theme.
 */

.t7dc-wrap {
    --t7dc-primary: #1d2e3d;
    --t7dc-accent: #edbf51;
    --t7dc-ink: #1d2e3d;
    --t7dc-muted: #5b7483;
    --t7dc-line: #e2e8f0;
    --t7dc-soft: #f6fbff;
    --t7dc-chip: #e7f0f6;
    --t7dc-bar-bg: #e7eef6;
    --t7dc-max-width: 100%;
    --t7dc-radius: 12px;

    max-width: var(--t7dc-max-width);
    width: 100%;
    margin: 0 auto;
    color: var(--t7dc-ink);
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
}

.t7dc-wrap *,
.t7dc-wrap *::before,
.t7dc-wrap *::after {
    box-sizing: border-box;
}

.t7dc-card {
    border: 1px solid var(--t7dc-line);
    border-radius: var(--t7dc-radius);
    padding: 20px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.t7dc-title {
    font-size: 24px;
    line-height: 1.2;
    margin: 0 0 8px;
    color: var(--t7dc-primary);
    font-family: inherit;
    font-weight: 700;
}

.t7dc-step-title {
    font-size: 18px;
    line-height: 1.3;
    margin: 18px 0 8px;
    color: var(--t7dc-primary);
    font-family: inherit;
    font-weight: 700;
}

.t7dc-muted {
    color: var(--t7dc-muted);
    font-size: 14px;
    margin: 0 0 16px;
}

.t7dc-progress {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.t7dc-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cdd9e3;
    transition: background-color 0.15s ease;
}

.t7dc-dot.is-active {
    background: var(--t7dc-primary);
}

.t7dc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 900px) {
    .t7dc-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.t7dc-step {
    display: none;
}

.t7dc-step[aria-hidden="false"] {
    display: block;
}

.t7dc-field {
    margin-bottom: 14px;
}

.t7dc-field > label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--t7dc-ink);
}

.t7dc-hint {
    font-size: 12px;
    color: var(--t7dc-muted);
    margin-top: 4px;
}

.t7dc-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .t7dc-row {
        grid-template-columns: 1fr 1fr;
    }
}

.t7dc-wrap input[type="range"] {
    width: 100%;
    accent-color: var(--t7dc-accent);
}

.t7dc-wrap output {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    margin-left: 4px;
    font-family: inherit;
}

.t7dc-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.t7dc-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--t7dc-primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.t7dc-btn:hover,
.t7dc-btn:focus-visible {
    background: var(--t7dc-accent);
    color: var(--t7dc-primary);
    text-decoration: none;
}

.t7dc-btn:active {
    transform: translateY(1px);
}

.t7dc-btn-secondary {
    background: var(--t7dc-chip);
    color: var(--t7dc-primary);
}

.t7dc-btn-secondary:hover,
.t7dc-btn-secondary:focus-visible {
    background: var(--t7dc-accent);
    color: var(--t7dc-primary);
}

.t7dc-btn[disabled],
.t7dc-btn[disabled]:hover {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--t7dc-chip);
    color: var(--t7dc-muted);
}

.t7dc-kv {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    font-size: 15px;
    margin-top: 8px;
}

.t7dc-kv > div:nth-child(2n) {
    font-weight: 700;
    text-align: right;
}

.t7dc-total {
    font-size: 20px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--t7dc-line);
    font-weight: 800;
    color: var(--t7dc-primary);
}

.t7dc-per-hour {
    margin-top: 6px;
}

.t7dc-aside {
    position: sticky;
    top: 12px;
    align-self: start;
    border: 1px solid var(--t7dc-line);
    border-radius: var(--t7dc-radius);
    padding: 16px;
    background: var(--t7dc-soft);
}

.t7dc-aside h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--t7dc-primary);
    font-family: inherit;
    font-weight: 700;
}

.t7dc-aside p {
    margin: 0 0 8px;
    font-size: 14px;
    color: #35576b;
}

.t7dc-bar {
    height: 12px;
    background: var(--t7dc-bar-bg);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 4px;
}

.t7dc-bar > span {
    display: block;
    height: 100%;
    background: var(--t7dc-accent);
    width: 0%;
    transition: width 0.35s ease;
}

.t7dc-viz {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.t7dc-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--t7dc-chip);
    color: var(--t7dc-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.t7dc-radio-grid {
    display: grid;
    gap: 8px;
}

.t7dc-radio-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--t7dc-line);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    background: #fff;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.t7dc-radio-grid label:hover {
    border-color: var(--t7dc-primary);
}

.t7dc-radio-grid label:has(input:checked) {
    border-color: var(--t7dc-accent);
    background: var(--t7dc-soft);
}

.t7dc-radio-grid input {
    transform: scale(1.1);
    accent-color: var(--t7dc-accent);
}
