/* Forex tools: lot size calculator, pip value calculator, economic calendar */
.fmt { margin: 0 0 2rem; }
.fmt *, .fmt *::before, .fmt *::after { box-sizing: border-box; }
.fmt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
@media (max-width: 860px) { .fmt-grid { grid-template-columns: 1fr; } }

.fmt-card { background: #fff; border: 1px solid var(--line-color); border-radius: var(--radius); padding: 22px 24px; box-shadow: 0 6px 24px rgba(0, 0, 0, .05); }
.fmt-card h3, .fmt-h { font-family: var(--heading-font); font-size: 1.15rem; margin: 0 0 14px; color: var(--heading-color); }
.fmt-h { margin: 32px 0 12px; }
.fmt-out { background: #0e0e10; border-color: #0e0e10; color: #eee; }
.fmt-out h3 { color: var(--accent-color); }

.fmt-row { align-items: end; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 480px) { .fmt-row { grid-template-columns: 1fr; } }
.fmt label { display: block; font-size: .85rem; font-weight: 600; color: var(--heading-color); }
.fmt label small { font-weight: 400; color: #777; }
.fmt input, .fmt select {
	display: block; width: 100%; margin-top: 4px; padding: 9px 11px; font: inherit; font-weight: 400; font-size: .95rem;
	border: 1px solid #cfcfcf; border-radius: var(--radius); background: #fff; color: #111; height: 42px;
}
.fmt input:focus, .fmt select:focus { outline: 2px solid var(--accent-color); border-color: var(--accent-color); }
.fmt details { margin-top: 4px; font-size: .9rem; }
.fmt summary { cursor: pointer; color: var(--link-color); margin-bottom: 10px; }

.fmt-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.fmt-table th, .fmt-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-color); text-align: start; }
.fmt-out .fmt-table th, .fmt-out .fmt-table td { border-bottom-color: rgba(255, 255, 255, .12); }
.fmt-out .fmt-table th { font-weight: 500; color: #b8b8c0; }
.fmt-out .fmt-table td { text-align: end; color: #fff; }
.fmt-big { font-size: 1.6rem; color: var(--accent-color); }
.fmt-msg { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius); background: rgba(255, 196, 81, .15); color: #ffd98a; font-size: .9rem; }
.fmt-bad { background: rgba(239, 106, 106, .15); color: #ff9c9c; }
.fmt-note { margin-top: 16px; font-size: .82rem; color: #777; }

.fmt-tablewrap { overflow-x: auto; }
.fmt-all th { background: var(--soft-bg); font-size: .85rem; }
.fmt-all td, .fmt-all th { text-align: end; white-space: nowrap; }
.fmt-all td:first-child, .fmt-all th:first-child { text-align: start; font-weight: 600; }
.fmt-all .fmt-sel td { background: rgba(255, 196, 81, .22); }

.fmt-calendar .tradingview-widget-copyright { font-size: .8rem; text-align: center; margin-top: 6px; }

/* Keep table colours under our control, whatever the theme or page builder does to tables. */
.fmt .fmt-table, .fmt .fmt-table tbody, .fmt .fmt-table thead { background: transparent; }
.fmt .fmt-table tr, .fmt .fmt-table th, .fmt .fmt-table td { background: transparent !important; box-shadow: none !important; }
.fmt .fmt-out .fmt-table th { color: #b8b8c0 !important; }
.fmt .fmt-out .fmt-table td { color: #fff !important; }
.fmt .fmt-big { color: var(--accent-color) !important; }
.fmt .fmt-all th { background: var(--soft-bg) !important; color: #111 !important; }
.fmt .fmt-all td { color: #222 !important; }
.fmt .fmt-all tr:nth-child(even) td { background: rgba(0, 0, 0, .025) !important; }
.fmt .fmt-all .fmt-sel td { background: rgba(255, 196, 81, .28) !important; }
.fmt-calendar iframe { display: block; width: 100%; border: 0; min-height: 600px; }
.fmt-calendar .fmt-note a { color: var(--link-color); }

.fmt-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.fmt-tabs button { border: 1px solid var(--line-color); background: #fff; color: #333; border-radius: 20px; padding: 6px 16px; font-size: .88rem; cursor: pointer; }
.fmt-tabs button.is-on { background: #111; color: var(--accent-color); border-color: #111; }
.fmt-frame iframe { display: block; width: 100%; border: 1px solid var(--line-color); border-radius: var(--radius); background: #fff; }
.fmt-calendar .fmt-note { margin: 8px 0 0; text-align: center; }
.fmt-calendar .fmt-msgline:empty { display: none; }

/* Text under each tool */
.tool-page .entry-content h2 { margin-top: 2.2rem; }
.tool-page .entry-content > h2 ~ * { max-width: 820px; margin-inline: auto; }
.tool-page .entry-content > h2 { max-width: 820px; margin-inline: auto; }
