/* ==========================================================
   REXAI Tools — shared styles for individual tool pages
   Loaded on top of /assets/css/style.css (REXAI's main design system)
   ========================================================== */

.tool-breadcrumb {
    font-size: 13.5px;
    color: var(--text-muted-on-dark);
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tool-breadcrumb a { color: var(--text-muted-on-dark); transition: color .2s ease; }
.tool-breadcrumb a:hover { color: var(--cyan); }
.tool-breadcrumb strong { color: var(--text-on-dark); font-weight: 500; }

.tool-hero-head { max-width: 680px; margin-bottom: 44px; }
.tool-hero-head h1 { font-size: clamp(28px, 4.5vw, 42px); font-weight: 700; margin-bottom: 14px; }
.tool-hero-head p { color: var(--text-muted-on-dark); font-size: 16px; }

.tool-workbench {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 60px;
}

.tool-card-main {
    background: var(--dark-3);
    border: 1px solid rgba(80,232,244,0.12);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.tool-sidebar-note {
    background: var(--dark-2);
    border: 1px solid rgba(80,232,244,0.1);
    border-radius: var(--radius-md);
    padding: 26px;
}
.tool-sidebar-note h3 { font-size: 15px; margin-bottom: 14px; }
.tool-sidebar-note ol { margin: 0 0 22px; padding-left: 20px; color: var(--text-muted-on-dark); font-size: 14px; line-height: 1.8; }
.privacy-note {
    display: flex; gap: 12px; align-items: flex-start;
    padding-top: 18px; border-top: 1px solid rgba(80,232,244,0.1);
    font-size: 13px; color: var(--text-muted-on-dark);
}
.privacy-note i { color: var(--mint); margin-top: 2px; }
.privacy-note strong { color: var(--text-on-dark); display: block; margin-bottom: 4px; font-size: 13.5px; }

/* Form elements */
.tool-field { margin-bottom: 20px; }
.tool-field label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text-muted-on-dark); margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.tool-field input[type=text], .tool-field input[type=number], .tool-field input[type=password],
.tool-field input[type=date], .tool-field input[type=datetime-local],
.tool-field textarea, .tool-field select {
    width: 100%;
    background: var(--dark);
    border: 1px solid rgba(80,232,244,0.18);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-on-dark);
    font-family: var(--font-body);
    font-size: 14.5px;
    transition: border-color .2s ease;
}
.tool-field input:focus, .tool-field textarea:focus, .tool-field select:focus { outline: none; border-color: var(--cyan); }
.tool-field textarea { resize: vertical; min-height: 130px; }
.tool-field.large textarea { min-height: 220px; }

.tool-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.tool-check-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14.5px; }
.tool-check-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--cyan); }

.tool-range-row { display: flex; align-items: center; gap: 16px; }
.tool-range-row input[type=range] { flex: 1; accent-color: var(--cyan); height: 4px; }
.tool-range-row strong { min-width: 34px; text-align: right; color: var(--cyan); font-size: 16px; }

.tool-btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* Results */
.tool-result-box {
    background: var(--dark);
    border: 1px solid rgba(80,232,244,0.16);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    font-size: 14.5px;
    color: var(--text-on-dark);
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 18px;
    min-height: 26px;
}
.tool-big-result {
    font-family: var(--font-heading);
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 700;
    color: var(--cyan);
    margin: 18px 0 8px;
}
.tool-result-note { color: var(--text-muted-on-dark); font-size: 14px; }

.tool-output-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--dark);
    border: 1px solid rgba(80,232,244,0.16);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 16px;
}
.tool-output-row code { flex: 1; font-size: 15px; color: var(--cyan-light); word-break: break-all; font-family: 'Courier New', monospace; }
.tool-icon-btn {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 8px; border: 1px solid rgba(80,232,244,0.2);
    background: transparent; color: var(--cyan);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s ease;
}
.tool-icon-btn:hover { background: rgba(80,232,244,0.1); }

/* Strength meter */
.strength-meter { margin-top: 16px; }
.strength-bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; margin-bottom: 8px; }
.strength-bar-fill { height: 100%; border-radius: 4px; transition: width .3s ease, background .3s ease; }
.strength-label { font-size: 13.5px; font-weight: 600; }

/* QR result */
.qr-result-wrap { text-align: center; margin-top: 22px; }
.qr-paper { display: inline-block; background: #fff; padding: 16px; border-radius: 12px; }

/* ==========================================================
   LIGHT / WHITE WORKBENCH VARIANT
   Used by the newer utility tools (image, pdf, qr suite, favicon,
   json/csv). Header + footer stay dark; only the working area
   is a solid white card so it feels like a clean app surface,
   while buttons/accents still use REXAI's teal.
   ========================================================== */
:root {
    --teal-strong: #0BA5B0;   /* darker teal — readable on white */
    --teal-strong-hover: #098C95;
    --light-bg: #FFFFFF;
    --light-bg-soft: #F3FBFB;
    --light-border: #DCEFF0;
    --light-text: #0B2426;
    --light-text-muted: #5C7A7D;
}

.tool-card-main.light,
.tool-sidebar-note.light {
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    color: var(--light-text);
    box-shadow: 0 20px 50px -30px rgba(0,22,25,0.35);
}
.tool-sidebar-note.light h3 { color: var(--light-text); }
.tool-sidebar-note.light ol,
.tool-sidebar-note.light p { color: var(--light-text-muted); }
.tool-sidebar-note.light .privacy-note { border-top-color: var(--light-border); }
.tool-sidebar-note.light .privacy-note strong { color: var(--light-text); }

.light .tool-field label { color: var(--light-text-muted); }
.light .tool-field input[type=text], .light .tool-field input[type=number],
.light .tool-field input[type=password], .light .tool-field input[type=date],
.light .tool-field input[type=datetime-local], .light .tool-field textarea,
.light .tool-field select {
    background: var(--light-bg-soft);
    border: 1px solid var(--light-border);
    color: var(--light-text);
}
.light .tool-field input:focus, .light .tool-field textarea:focus, .light .tool-field select:focus {
    border-color: var(--teal-strong);
}
.light .tool-result-box, .light .tool-output-row {
    background: var(--light-bg-soft);
    border-color: var(--light-border);
    color: var(--light-text);
}
.light .tool-output-row code { color: var(--teal-strong); }
.light .tool-icon-btn { border-color: var(--light-border); color: var(--teal-strong); }
.light .tool-icon-btn:hover { background: rgba(11,165,176,0.1); }
.light .tool-drop { border-color: #BFE3E5; }
.light .tool-drop:hover, .light .tool-drop.dragover { border-color: var(--teal-strong); background: rgba(11,165,176,0.06); }
.light .tool-drop i { color: var(--teal-strong); }
.light .tool-drop .hint { color: var(--light-text-muted); }
.light .tool-big-result { color: var(--teal-strong); }
.light .tool-check-row input[type=checkbox] { accent-color: var(--teal-strong); }
.light .tool-range-row input[type=range] { accent-color: var(--teal-strong); }
.light .tool-range-row strong { color: var(--teal-strong); }

.btn-teal {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--teal-strong); color: #fff; border: none;
    padding: 12px 22px; border-radius: var(--radius-sm);
    font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
    cursor: pointer; transition: background .2s ease;
    text-decoration: none;
}
.btn-teal:hover { background: var(--teal-strong-hover); }
.btn-teal:disabled { opacity: .5; cursor: not-allowed; }
.btn-teal-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: transparent; color: var(--teal-strong); border: 1.5px solid var(--teal-strong);
    padding: 11px 20px; border-radius: var(--radius-sm);
    font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
    cursor: pointer; transition: all .2s ease; text-decoration: none;
}
.btn-teal-outline:hover { background: rgba(11,165,176,0.08); }

/* Simple file list rows used by batch-mode tools */
.tool-file-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.tool-file-row {
    display: flex; align-items: center; gap: 14px;
    background: var(--light-bg-soft); border: 1px solid var(--light-border);
    border-radius: var(--radius-sm); padding: 10px 14px;
}
.tool-file-row .thumb { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; background: #eaf6f6; flex-shrink: 0; }
.tool-file-row .meta { flex: 1; min-width: 0; }
.tool-file-row .meta .name { font-size: 13.5px; font-weight: 600; color: var(--light-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-file-row .meta .sizes { font-size: 12.5px; color: var(--light-text-muted); }
.tool-file-row .sizes .save { color: #0E9A57; font-weight: 600; }
.tool-file-row .actions { display: flex; gap: 8px; flex-shrink: 0; }
.tool-progress { height: 6px; border-radius: 4px; background: var(--light-border); overflow: hidden; margin-top: 6px; }
.tool-progress-fill { height: 100%; background: var(--teal-strong); width: 0%; transition: width .2s ease; }

.tool-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tool-tab {
    padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    background: rgba(80,232,244,0.08); color: var(--text-muted-on-dark);
    border: 1px solid rgba(80,232,244,0.15); cursor: pointer; transition: all .2s ease;
}
.tool-tab.active { background: var(--cyan); color: var(--dark); border-color: var(--cyan); }

/* Drop zone (QR scanner upload) */
.tool-drop {
    border: 2px dashed rgba(80,232,244,0.25);
    border-radius: var(--radius-md);
    padding: 34px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
}
.tool-drop:hover, .tool-drop.dragover { border-color: var(--cyan); background: rgba(80,232,244,0.05); }
.tool-drop i { font-size: 30px; color: var(--cyan); margin-bottom: 12px; }
.tool-drop .hint { font-size: 12.5px; color: var(--text-muted-on-dark); margin-top: 8px; }

.tool-error {
    background: rgba(255,99,99,0.1);
    color: #ff8888;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-top: 14px;
}

/* Info sections below the tool */
.tool-info-section { max-width: 760px; margin: 0 auto 60px; }
.tool-info-section h2 { font-size: 22px; margin-bottom: 16px; }
.tool-info-section ol, .tool-info-section ul { color: var(--text-muted-on-dark); padding-left: 22px; line-height: 1.9; }
.tool-info-section p { color: var(--text-muted-on-dark); line-height: 1.8; }

@media (max-width: 860px) {
    .tool-workbench { grid-template-columns: 1fr; }
    .tool-row-2 { grid-template-columns: 1fr; }
    .tool-card-main { padding: 24px; }
}
