/* FAK LAB - Shared Tool Page Styles */
@import url('../assets/fonts/fonts.css');
@import url('../assets/css/bootstrap-icons.css');

:root {
    --bg: #f8f9fa; --bg-card: #fff; --text: #09090b; --text-muted: #52525b;
    --border: #e4e4e7; --purple: #8b5cf6; --red: #ef4444; --green: #10b981;
    --yellow: #f59e0b; --shadow: 0 4px 6px -1px rgba(0,0,0,.05);
    --font-display: 'Space Grotesk', sans-serif; --font-body: 'Inter', sans-serif;
}
[data-bs-theme="dark"] {
    --bg: #09090b; --bg-card: #18181b; --text: #f4f4f5; --text-muted: #a1a1aa;
    --border: #27272a; --shadow: 0 4px 6px -1px rgba(0,0,0,.4);
}
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); margin: 0; min-height: 100vh; }
h1,h2,h3,h4,h5 { font-family: var(--font-display); letter-spacing: -.02em; }

/* Tool Header */
.tool-header {
    background: var(--bg-card); border-bottom: 1px solid var(--border);
    padding: .75rem 1.25rem; position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; gap: 12px;
}
.tool-header a { color: var(--text-muted); text-decoration: none; font-size: .85rem; display: flex; align-items: center; gap: 6px; }
.tool-header a:hover { color: var(--purple); }
.tool-header .tool-title-bar { font-weight: 700; font-size: 1rem; margin: 0 auto 0 0; }

/* Theme btn */
#theme-toggle {
    background: none; border: 1px solid var(--border); color: var(--text);
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: .2s;
}
#theme-toggle:hover { border-color: var(--purple); color: var(--purple); }

/* Main wrapper */
.tool-wrap { max-width: 860px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.tool-hero { text-align: center; margin-bottom: 2rem; }
.tool-hero h1 { font-size: 1.8rem; margin-bottom: .4rem; }
.tool-hero p { color: var(--text-muted); margin: 0; }
.tool-icon-hero { font-size: 2.5rem; margin-bottom: .75rem; }

/* Card */
.t-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem;
}

/* Inputs */
.t-input, .t-textarea, .t-select {
    width: 100%; padding: .75rem 1rem; border-radius: 10px;
    border: 1.5px solid var(--border); background: var(--bg);
    color: var(--text); font-family: var(--font-body); font-size: .95rem;
    transition: .2s; outline: none;
}
.t-input:focus, .t-textarea:focus, .t-select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139,92,246,.15); }
.t-textarea { resize: vertical; min-height: 140px; }

/* Buttons */
.t-btn {
    padding: .7rem 1.5rem; border-radius: 50px; border: none;
    font-weight: 600; font-size: .9rem; cursor: pointer; transition: .2s;
    display: inline-flex; align-items: center; gap: 8px;
}
.t-btn-primary { background: var(--text); color: var(--bg-card); }
.t-btn-primary:hover { opacity: .85; transform: translateY(-1px); }
.t-btn-secondary { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.t-btn-secondary:hover { border-color: var(--purple); color: var(--purple); }
.t-btn-danger { background: var(--red); color: #fff; }
.t-btn-success { background: var(--green); color: #fff; }

/* Output box */
.t-output {
    background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px;
    padding: 1rem; font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: .85rem; word-break: break-all; white-space: pre-wrap;
    min-height: 80px; color: var(--text);
}

/* Copy btn row */
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: .75rem; }

/* Badge */
.t-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: .75rem; font-weight: 700; background: rgba(139,92,246,.12); color: var(--purple);
}

/* Range slider */
.t-range { width: 100%; accent-color: var(--purple); }

/* Checkbox / Radio */
.t-check { accent-color: var(--purple); width: 16px; height: 16px; cursor: pointer; }

/* Divider */
.t-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* Grid 2-col */
.t-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .t-grid-2 { grid-template-columns: 1fr; } }

/* Drop zone */
.drop-zone {
    border: 2px dashed var(--border); border-radius: 12px;
    padding: 2.5rem 1rem; text-align: center; cursor: pointer;
    transition: .2s; color: var(--text-muted);
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--purple); color: var(--purple); background: rgba(139,92,246,.04); }
.drop-zone input[type=file] { display: none; }

/* Toast */
.t-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
    background: var(--text); color: var(--bg-card); padding: .6rem 1.4rem;
    border-radius: 50px; font-size: .85rem; font-weight: 600;
    transition: .3s; z-index: 9999; opacity: 0; pointer-events: none;
}
.t-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════════
   BOOTSTRAP UTILITY CLASSES (subset used by tool pages)
   ═══════════════════════════════════════════════════════════════ */

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }
.d-inline-block { display: inline-block !important; }

/* Flex */
.flex-wrap { flex-wrap: wrap !important; }
.flex-column { flex-direction: column !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }

/* Gap */
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

/* Margins */
.m-0 { margin: 0 !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-1 { margin-left: .25rem !important; }
.ms-2 { margin-left: .5rem !important; }
.ms-auto { margin-left: auto !important; }

/* Padding */
.p-0 { padding: 0 !important; }
.p-2 { padding: .5rem !important; }
.p-3 { padding: 1rem !important; }
.py-1 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
.py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.px-2 { padding-left: .5rem !important; padding-right: .5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }

/* Text */
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--green) !important; }
.text-danger { color: var(--red) !important; }
.text-warning { color: var(--yellow) !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.small { font-size: .875rem !important; }

/* Width */
.w-100 { width: 100% !important; }

/* Border */
.border { border: 1px solid var(--border) !important; }
.border-bottom { border-bottom: 1px solid var(--border) !important; }
.border-top { border-top: 1px solid var(--border) !important; }
.rounded { border-radius: 8px !important; }

/* Position */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
