/* =========================================================
   143TOOL - Tip Calculator Styles
   Version: 1.0.0
   ========================================================= */

.tip-card {
    padding: 30px;
    max-width: 720px;
    margin: 0 auto;
}

/* ---------- CURRENCY ---------- */
.tip-currency {
    margin-bottom: 22px;
}

.tip-currency-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.tip-currency-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.tip-cur {
    padding: 10px 8px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: background .2s ease, color .2s ease;
}

.tip-cur:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.tip-cur.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 4px 14px rgba(233, 30, 99, .22);
}

/* ---------- FORM ---------- */
.tip-card .form-group {
    margin-bottom: 20px;
}

.tip-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Input with symbol */
.tip-input-wrap {
    position: relative;
}

.tip-input-wrap input {
    width: 100%;
    padding: 13px 15px 13px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--body-bg);
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.tip-input-wrap input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.tip-input-wrap input::-webkit-outer-spin-button,
.tip-input-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tip-input-wrap input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.tip-cur-symbol {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 700;
    pointer-events: none;
}

.tip-symbol-right {
    left: auto;
    right: 14px;
}

.tip-input-wrap input.tip-right-pad {
    padding-right: 40px;
}

/* ---------- PRESETS ---------- */
.tip-presets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.tip-preset {
    padding: 10px 4px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: all .2s ease;
}

.tip-preset:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.tip-preset.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(233, 30, 99, .22);
}

/* ---------- PEOPLE ---------- */
.tip-people-row {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    gap: 8px;
    align-items: center;
}

.tip-people-row input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--body-bg);
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.tip-people-row input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.tip-people-row input::-webkit-outer-spin-button,
.tip-people-row input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tip-people-row input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.tip-step {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: all .15s ease;
    display: grid;
    place-items: center;
}

.tip-step:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.tip-step:active {
    transform: scale(.94);
}

/* ---------- ACTIONS ---------- */
.tip-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* ---------- ERROR ---------- */
.tip-error {
    margin-top: 20px;
    padding: 12px 15px;
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border));
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 14px;
    font-weight: 600;
}

/* ---------- RESULT ---------- */
.tip-result {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    animation: tipFade .3s ease;
}

@keyframes tipFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Big total */
.tip-total-wrap {
    text-align: center;
    margin-bottom: 26px;
}

.tip-total-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tip-total {
    font-size: clamp(36px, 7vw, 54px);
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    word-break: break-word;
}

/* Breakdown grid */
.tip-breakdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.tip-stat {
    padding: 16px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.tip-stat-highlight {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
}

.tip-stat-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.tip-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

/* Round-up note */
.tip-roundup {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 16px;
    background: color-mix(in srgb, #f59e0b 8%, transparent);
    border: 1px solid color-mix(in srgb, #f59e0b 25%, var(--border));
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    line-height: 1.55;
}

.tip-roundup-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.3;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 620px) {
    .tip-card { padding: 20px; }
    .tip-currency-options { grid-template-columns: repeat(2, 1fr); }
    .tip-presets { grid-template-columns: repeat(3, 1fr); }
    .tip-breakdown { grid-template-columns: 1fr; }
    .tip-stat-value { font-size: 19px; }
    .tip-actions .btn { flex: 1; }
}
/* =========================================================
   SEO ARTICLE / ADSENSE CONTENT
   ========================================================= */

.tool-article {
    max-width: 800px;
    margin: 60px auto 40px;
    padding: 30px 0;
    border-top: 1px solid var(--border);
}

.tool-article h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin: 36px 0 14px;
    line-height: 1.3;
    letter-spacing: -.4px;
}

.tool-article h2:first-child {
    margin-top: 0;
}

.tool-article h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 24px 0 10px;
    line-height: 1.4;
}

.tool-article p {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.tool-article ul,
.tool-article ol {
    padding-left: 22px;
    margin: 0 0 18px;
}

.tool-article li {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tool-article strong {
    color: var(--text);
    font-weight: 700;
}

.tool-article a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color .15s ease;
}

.tool-article a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

@media (max-width: 620px) {
    .tool-article {
        padding: 20px 0;
        margin: 40px auto 20px;
    }
    .tool-article h2 {
        font-size: 20px;
        margin: 28px 0 12px;
    }
    .tool-article h3 {
        font-size: 16px;
        margin: 20px 0 8px;
    }
    .tool-article p,
    .tool-article li {
        font-size: 15px;
        line-height: 1.7;
    }
}