/* TikTok Earnings Calculator — Stylesheet v1.0.0 */

:root {
    --tc-primary: #ee1d52;
    --tc-bg: #ffffff;
    --tc-surface: #f8f8f8;
    --tc-border: rgba(0,0,0,0.10);
    --tc-text: #1a1a1a;
    --tc-muted: #666666;
    --tc-hint: #999999;
    --tc-radius: 10px;
    --tc-radius-sm: 6px;
}

.tiktok-calc-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--tc-bg);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    overflow: hidden;
    max-width: 980px;
    margin: 0 auto 2rem;
    box-sizing: border-box;
}

.tiktok-calc-wrapper *, .tiktok-calc-wrapper *::before, .tiktok-calc-wrapper *::after {
    box-sizing: border-box;
}

/* Header */
.tc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--tc-border);
    background: var(--tc-bg);
}

.tc-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--tc-text);
}

.tc-badge {
    font-size: 11px;
    font-weight: 600;
    background: #fff0f3;
    color: var(--tc-primary);
    border: 1px solid rgba(238,29,82,0.2);
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Body layout */
.tc-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 680px) {
    .tc-body {
        grid-template-columns: 1fr;
    }
}

/* Inputs panel */
.tc-inputs {
    padding: 20px;
    border-right: 1px solid var(--tc-border);
    background: var(--tc-surface);
}

@media (max-width: 680px) {
    .tc-inputs { border-right: none; border-bottom: 1px solid var(--tc-border); }
}

.tc-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--tc-hint);
    margin-bottom: 14px;
}

.tc-field {
    margin-bottom: 18px;
}

.tc-field label {
    display: block;
    font-size: 13px;
    color: var(--tc-muted);
    margin-bottom: 7px;
    font-weight: 400;
}

.tc-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tc-range {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--tc-border);
    outline: none;
    cursor: pointer;
}

.tc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tc-primary);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--tc-primary);
}

.tc-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tc-primary);
    cursor: pointer;
    border: 2px solid #fff;
}

.tc-range-val {
    font-size: 13px;
    font-weight: 600;
    min-width: 52px;
    text-align: right;
    color: var(--tc-text);
}

/* Niche tabs */
.tc-niche-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tc-tab {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid var(--tc-border);
    border-radius: 20px;
    background: var(--tc-bg);
    color: var(--tc-muted);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.tc-tab:hover {
    border-color: var(--tc-primary);
    color: var(--tc-primary);
}

.tc-tab.active {
    background: var(--tc-primary);
    color: #fff;
    border-color: var(--tc-primary);
    font-weight: 600;
}

/* Results panel */
.tc-results {
    padding: 20px;
    background: var(--tc-bg);
}

/* Tier bar */
.tc-tier-bar {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.tc-tier-pill {
    flex: 1;
    padding: 6px 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid transparent;
    color: var(--tc-hint);
    background: var(--tc-surface);
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
    line-height: 1.4;
}

.tc-tier-pill:hover {
    border-color: var(--tc-primary);
    color: var(--tc-primary);
    background: #fff0f3;
}

.tc-tier-pill.active {
    font-weight: 700;
}

.tc-tier-pill:focus-visible {
    outline: 2px solid var(--tc-primary);
    outline-offset: 2px;
}

.tc-tier-note {
    font-size: 12px;
    color: #0c5a9e;
    background: #e8f2fc;
    border: 1px solid #b3d4f5;
    border-radius: var(--tc-radius-sm);
    padding: 10px 12px;
    line-height: 1.5;
    min-height: 40px;
}

/* Metric cards */
.tc-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.tc-metric {
    background: var(--tc-surface);
    border-radius: var(--tc-radius-sm);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tc-metric-label {
    font-size: 11px;
    color: var(--tc-hint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tc-metric-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--tc-primary);
}

.tc-metric-sub {
    font-size: 11px;
    color: var(--tc-hint);
}

/* Breakdown list */
.tc-breakdown {
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-sm);
    overflow: hidden;
}

.tc-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--tc-muted);
    border-bottom: 1px solid var(--tc-border);
}

.tc-breakdown-row:last-child {
    border-bottom: none;
}

.tc-breakdown-row strong {
    color: var(--tc-text);
    font-weight: 600;
}

/* Disclaimer */
.tc-disclaimer {
    font-size: 11px;
    color: var(--tc-hint);
    margin-top: 16px;
    line-height: 1.5;
    border-top: 1px solid var(--tc-border);
    padding-top: 12px;
}
