/* Converter + password-generator widgets — "Overworld" chrome.
   Uses the theme CSS variables so they follow light/dark + accent. */

/* ---------- Shared fields ---------- */
.ft-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ft-field > span, .ft-field legend { font-family: var(--font-mono); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.ft-field input[type="text"],
.ft-field input[type="date"] {
	padding: 11px 13px; border-radius: var(--radius);
	border: 2px solid var(--ink); background: var(--surface); color: var(--text);
	font-family: var(--font-body); font-size: 15px;
}
.ft-field input:focus { outline: none; box-shadow: var(--shadow-sm); }
input[type="range"] { accent-color: var(--accent); }
input[type="checkbox"] { accent-color: var(--accent); width: 17px; height: 17px; }

/* ---------- Converter ---------- */
.ft-dropzone {
	border: 2px dashed var(--ink); border-radius: var(--radius);
	padding: 48px 24px; text-align: center; cursor: pointer;
	background: var(--surface-2); transition: background .12s ease;
}
.ft-dropzone:hover, .ft-dropzone.is-dragover { background: var(--accent-soft); }
.ft-dropzone__icon { font-size: 48px; color: var(--accent); }
.ft-dropzone__text { color: var(--text-muted); margin-top: 8px; }
.ft-dropzone__filename { margin-top: 12px; text-align: center; font-size: 14px; color: var(--accent); font-weight: 700; word-break: break-all; }

.ft-progress { margin-top: 24px; }
.ft-progress__bar { height: 16px; border-radius: 4px; border: 2px solid var(--ink); background: var(--surface-2); overflow: hidden; padding: 2px; }
/* Segmented "16-bit loading bar" fill — blocky ticks like the Overworld reference. */
.ft-progress__fill { height: 100%; width: 0%; border-radius: 2px; transition: width .2s ease; background-color: var(--accent); background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 2px, transparent 2px 11px); }
.ft-progress__label { text-align: center; color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-top: 8px; }

.ft-converter__error {
	margin-top: 16px; padding: 12px 16px; border-radius: var(--radius);
	background: var(--surface); color: var(--bad); border: 2px solid var(--bad); font-size: 14px;
}
.ft-converter__result {
	margin-top: 24px; text-align: center; padding: 32px; border-radius: var(--radius);
	background: var(--accent-soft); border: 2px solid var(--ink); box-shadow: var(--shadow-sm);
}
.ft-converter__result .material-symbols-outlined { font-size: 40px; color: var(--good); }

/* ---------- Password generator (mockup layout) ---------- */
.ft-pg { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; margin-top: 8px; }
@media (max-width: 900px) { .ft-pg { grid-template-columns: 1fr; } }
.ft-pg__main { min-width: 0; }

.ft-pg__result { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-md); padding: 20px; margin-bottom: 20px; }
.ft-pg__output { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface-2); border: 2px solid var(--ink); border-radius: var(--radius); flex-wrap: wrap; }
.ft-pg__output code { flex: 1; min-width: 160px; font-family: var(--font-mono); font-size: 18px; word-break: break-all; color: var(--text); }
.ft-pg__output .ft-btn { padding: 10px 16px; }
.ft-pg__strengthrow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 14px; font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.ft-pg__strengthrow b { color: var(--text); font-weight: 700; }
.ft-pg__bar { height: 12px; border: 2px solid var(--ink); border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.ft-pg__bar-fill { height: 100%; width: 0; background: var(--accent); transition: width .25s ease, background .25s ease; }

.ft-pg__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }
@media (max-width: 640px) { .ft-pg__cards { grid-template-columns: 1fr; } }
.ft-pg__card { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); padding: 20px; box-shadow: var(--shadow-sm); }
.ft-pg__card-title { font-family: var(--font-display); font-size: 18px; margin: 0 0 14px; }
.ft-pg__hint { color: var(--text-muted); font-size: 13px; margin: -6px 0 14px; }
.ft-pg__checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.ft-pg__check { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 8px; background: var(--surface-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.ft-pg__grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .ft-pg__grid2 { grid-template-columns: 1fr; } }

.ft-pg__side { display: flex; flex-direction: column; gap: 18px; }
.ft-pg__sidecard { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); padding: 18px; box-shadow: var(--shadow-sm); }
.ft-pg__sidecard--privacy { background: var(--accent-soft); }
.ft-pg__sidecard-title { font-family: var(--font-display); font-size: 16px; display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.ft-pg__sidecard-title .material-symbols-outlined { color: var(--accent); font-size: 20px; }
.ft-pg__sidecard--privacy p { color: var(--text-muted); font-size: 13px; margin: 0; line-height: 1.7; }
.ft-pg__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ft-pg__links a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 6px; color: var(--text); font-weight: 600; font-size: 14px; }
.ft-pg__links a:hover { background: var(--accent-soft); color: var(--accent); }
.ft-pg__links .material-symbols-outlined { color: var(--accent); font-size: 20px; }

/* Toast */
.ft-toast {
	position: fixed; bottom: 24px; left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--ink); color: var(--bg); border: 2px solid var(--ink);
	padding: 12px 20px; border-radius: 8px; font-family: var(--font-mono); font-size: 13px;
	opacity: 0; transition: opacity .2s ease, transform .2s ease; z-index: 300;
}
.ft-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
