/* ── YourToolbox · Shared Calculator CSS ── */
/* Blue header card | Green button | Green results | Donut chart | Sidebar */

/* ── Page wrap: main + sidebar ── */
.ytb-page-wrap {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 28px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #1a1d23;
    line-height: 1.65;
}
@media (max-width: 780px) {
    .ytb-page-wrap { grid-template-columns: 1fr; }
    .ytb-sidebar   { display: none; }
}

/* ── Tool ID badge ── */
.ytb-tool-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #1976D2;
    margin-bottom: 6px;
}

/* ── Calculator Card ── */
.ytb-calc-wrap {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.10);
    margin-bottom: 28px;
}
.ytb-calc-header {
    background: #1976D2;
    color: #fff;
    padding: 18px 22px 14px;
}
.ytb-calc-header h2 {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 0 0 4px !important;
    color: #fff !important;
    border: none !important;
    padding: 0 !important;
}
.ytb-calc-header p {
    font-size: 13px;
    opacity: .88;
    margin: 0;
}

/* ── Currency bar ── */
.ytb-currency-bar {
    display: flex;
    gap: 6px;
    padding: 12px 22px;
    background: #f0f4fa;
    border-bottom: 1px solid #dce3ef;
    flex-wrap: wrap;
}
.ytb-cur-btn {
    padding: 4px 11px;
    border-radius: 5px;
    border: 1.5px solid #b0bec5;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #374151;
    transition: all .13s;
}
.ytb-cur-btn.active,
.ytb-cur-btn:hover {
    background: #1976D2;
    border-color: #1976D2;
    color: #fff;
}

/* ── Fields grid ── */
.ytb-fields {
    padding: 20px 22px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 520px) { .ytb-fields { grid-template-columns: 1fr; } }

.ytb-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.ytb-field input,
.ytb-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    background: #fafafa;
    outline: none;
    transition: border-color .13s;
}
.ytb-field input:focus,
.ytb-field select:focus {
    border-color: #1976D2;
    background: #fff;
}

/* ── Calculate button ── */
.ytb-calc-btn-wrap {
    padding: 18px 22px;
}
.ytb-btn {
    width: 100%;
    padding: 13px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .13s;
    font-family: inherit;
}
.ytb-btn:hover { background: #1b5e20; }

/* ── Results box ── */
.ytb-result {
    margin: 0 22px 22px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 16px 20px;
    display: none;
}
.ytb-result.show { display: block; }
.ytb-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0,0,0,.07);
    font-size: 14.5px;
}
.ytb-result-row:last-child { border-bottom: none; }
.ytb-result-lbl { color: #2e7d32; }
.ytb-result-val {
    font-weight: 700;
    font-size: 16px;
    color: #1b5e20;
}
.ytb-result-val.big {
    font-size: 20px;
    color: #1976D2;
}

/* ── Donut chart ── */
.ytb-chart-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 22px 20px;
    flex-wrap: wrap;
}
.ytb-donut { width: 120px; height: 120px; flex-shrink: 0; }
.ytb-legend { font-size: 13px; }
.ytb-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.ytb-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Content area ── */
.ytb-content { padding-top: 4px; }
.ytb-content h2 {
    font-size: 19px !important;
    font-weight: 700 !important;
    margin: 28px 0 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #e5e7eb !important;
    color: #1a1d23 !important;
}
.ytb-content h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 20px 0 9px !important;
    color: #1a1d23 !important;
}
.ytb-content p  { margin-bottom: 13px; color: #374151; }
.ytb-content ul,
.ytb-content ol { margin: 0 0 13px 20px; color: #374151; }
.ytb-content li { margin-bottom: 5px; }

.ytb-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 13.5px;
}
.ytb-table th {
    background: #f3f4f6;
    text-align: left;
    padding: 9px 13px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    color: #374151;
}
.ytb-table td {
    padding: 8px 13px;
    border: 1px solid #e5e7eb;
    color: #374151;
    vertical-align: top;
}
.ytb-table tr:nth-child(even) td { background: #f9fafb; }

.ytb-tip {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    border-radius: 0 7px 7px 0;
    margin: 14px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
}

/* ── FAQ ── */
.ytb-faq { margin-top: 6px; }
.ytb-faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    margin-bottom: 8px;
    overflow: hidden;
}
.ytb-faq-q {
    padding: 13px 16px;
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    user-select: none;
}
.ytb-faq-a {
    padding: 0 16px 12px;
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
    display: none;
}
.ytb-faq-item.open .ytb-faq-a { display: block; }
.ytb-faq-item.open .ytb-faq-q { background: #fff; }

/* ── Sidebar ── */
.ytb-sidebar-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    overflow: hidden;
    font-size: 13.5px;
    position: sticky;
    top: 20px;
}
.ytb-sidebar-title {
    background: #1976D2;
    color: #fff;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 700;
}
.ytb-sidebar-list { list-style: none; margin: 0; padding: 6px 0; }
.ytb-sidebar-list li { border-bottom: 1px solid #f3f4f6; }
.ytb-sidebar-list li:last-child { border-bottom: none; }
.ytb-sidebar-list a {
    display: block;
    padding: 9px 14px;
    color: #1976D2;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    transition: background .12s;
}
.ytb-sidebar-list a:hover { background: #f0f4fa; }
