/* =========================================================
   143TOOL - Age Calculator Styles
   Version: 1.0.0
   ========================================================= */

.age-calc-card {
    padding: 30px;
    max-width: 720px;
    margin: 0 auto;
}

.age-form .form-group {
    margin-bottom: 18px;
}

.age-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

/* =========================================================
   AGE CALCULATOR - DATE INPUT FIX
   ========================================================= */

.age-form input[type="date"] {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--body-bg);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
    position: relative;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px 20px;
}

.age-form input[type="date"]:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

/* Hide native calendar icon (Chrome/Edge/Safari) */
.age-form input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    color: transparent;
    cursor: pointer;
    opacity: 0;
}

/* Hide native calendar icon (Firefox) */
.age-form input[type="date"]::-moz-calendar-picker-indicator {
    display: none;
}

/* ---------- DARK MODE: Light yellow icon ---------- */
html[data-theme="dark"] .age-form input[type="date"] {
    color-scheme: dark;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23fde68a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
}

/* ---------- SYSTEM THEME (respects OS preference) ---------- */
@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .age-form input[type="date"] {
        color-scheme: dark;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23fde68a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
    }
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.age-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.age-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 */
.age-result {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    animation: fadeIn .3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.age-main {
    text-align: center;
    margin-bottom: 25px;
}

.age-main-number {
    display: block;
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.age-main-label {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.age-breakdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.age-stat {
    padding: 16px 10px;
    text-align: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.age-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
}

.age-stat-label {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.age-summary {
    padding: 14px 18px;
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}

.age-extra {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.age-extra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.age-extra-label {
    color: var(--text-muted);
    font-weight: 600;
}

.age-extra-value {
    font-weight: 700;
    color: var(--text);
}
/* =========================================================
   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;
}

/* FAQ section */
.tool-article h3 + p {
    margin-bottom: 20px;
}

/* Responsive */
@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;
    }
}


@media (max-width: 620px) {
    .age-calc-card { padding: 22px; }
    .age-main-number { font-size: 52px; }
    .age-breakdown { grid-template-columns: repeat(2, 1fr); }
    .age-extra { grid-template-columns: 1fr; }
    .age-actions .btn { flex: 1; }
}