/* ================================================================
   Tuulipuku – Korkoa Korolle -laskuri
   ================================================================ */

.tkkl-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 780px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.10);
    overflow: hidden;
}

/* ── Syötteet ─────────────────────────────────────────────────── */
.tkkl-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 28px 28px 0;
    background: #f8faff;
    border-bottom: 1px solid #e8eef8;
}

@media (max-width: 520px) {
    .tkkl-inputs { grid-template-columns: 1fr; padding: 20px 16px 0; }
}

.tkkl-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 20px;
}

.tkkl-field label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tkkl-input-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #d0daf0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.tkkl-input-wrap:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.tkkl-prefix,
.tkkl-suffix {
    padding: 0 12px;
    font-weight: 700;
    font-size: 15px;
    color: #2563eb;
    background: #eef2ff;
    align-self: stretch;
    display: flex;
    align-items: center;
    user-select: none;
}

.tkkl-input-wrap input[type="number"] {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 14px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    background: transparent;
    width: 100%;
    -moz-appearance: textfield;
}
.tkkl-input-wrap input[type="number"]::-webkit-inner-spin-button,
.tkkl-input-wrap input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }

.tkkl-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 4px;
    background: #d0daf0;
    outline: none;
    margin-top: 2px;
    cursor: pointer;
}
.tkkl-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(37,99,235,0.4);
}
.tkkl-slider::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: none;
}

/* ── Tulokset ─────────────────────────────────────────────────── */
.tkkl-results {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0;
}

@media (max-width: 520px) {
    .tkkl-results { grid-template-columns: 1fr; }
}

.tkkl-result-box {
    padding: 22px 20px;
    border-right: 1px solid #e8eef8;
    background: #fff;
}
.tkkl-result-box:last-child { border-right: none; }

.tkkl-result-label {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.tkkl-result-value {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.1;
    transition: transform 0.2s, color 0.2s;
}

.tkkl-total .tkkl-result-value { font-size: 36px; color: #2563eb; }
.tkkl-result-value.tkkl-invested { color: #6b7280; font-size: 20px; }
.tkkl-result-value.tkkl-profit   { color: #16a34a; font-size: 20px; }

.tkkl-result-value.tkkl-bump {
    transform: scale(1.06);
    color: #f59e0b;
}

/* ── Kaavio ───────────────────────────────────────────────────── */
.tkkl-chart-wrap {
    padding: 24px 24px 16px;
    border-top: 1px solid #e8eef8;
    background: #fff;
}

/* ── CTA-rivi ─────────────────────────────────────────────────── */
.tkkl-cta-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px 24px 24px;
    background: #fff;
    border-top: 1px solid #e8eef8;
}

.tkkl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.tkkl-btn:hover { transform: translateY(-2px); }

.tkkl-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
    flex: 1;
    justify-content: center;
    text-align: center;
    min-width: 200px;
}
.tkkl-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    box-shadow: 0 6px 20px rgba(37,99,235,0.45);
    color: #fff;
    text-decoration: none;
}

.tkkl-btn-share {
    background: #f1f5f9;
    color: #374151;
    border: 2px solid #e2e8f0;
    white-space: nowrap;
}
.tkkl-btn-share:hover { background: #e2e8f0; }

.tkkl-share-msg {
    text-align: center;
    color: #16a34a;
    font-weight: 600;
    font-size: 14px;
    padding: 0 24px 12px;
}

/* ── Banneri ──────────────────────────────────────────────────── */
.tkkl-banner {
    padding: 16px 24px;
    background: #f8faff;
    border-top: 1px solid #e8eef8;
    font-size: 14px;
    color: #555;
}

/* ── Dark mode ────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .tkkl-wrap {
        background: #1e2130;
        box-shadow: 0 4px 32px rgba(0,0,0,0.40);
    }
    .tkkl-inputs { background: #161824; border-color: #2a2f45; }
    .tkkl-input-wrap { background: #1e2130; border-color: #2a2f45; }
    .tkkl-input-wrap:focus-within { border-color: #3b82f6; }
    .tkkl-prefix, .tkkl-suffix { background: #1a1f35; color: #60a5fa; }
    .tkkl-input-wrap input[type="number"] { color: #f1f5f9; }
    .tkkl-field label { color: #94a3b8; }
    .tkkl-slider { background: #2a2f45; }
    .tkkl-result-box { background: #1e2130; border-color: #2a2f45; }
    .tkkl-result-label { color: #64748b; }
    .tkkl-result-value { color: #f1f5f9; }
    .tkkl-total .tkkl-result-value { color: #60a5fa; }
    .tkkl-chart-wrap { background: #1e2130; border-color: #2a2f45; }
    .tkkl-cta-row { background: #1e2130; border-color: #2a2f45; }
    .tkkl-btn-share { background: #2a2f45; color: #cbd5e1; border-color: #374151; }
    .tkkl-btn-share:hover { background: #374151; }
    .tkkl-banner { background: #161824; border-color: #2a2f45; color: #94a3b8; }
}
