/* Med Ride visual document editor + document pages (Hiring → Documents). */

.doc-editor { border: 1px solid #dfe3ea; border-radius: 12px; background: #fff; position: relative; }
.doc-editor:focus-within { border-color: #86a8e7; box-shadow: 0 0 0 .2rem rgba(102, 126, 234, .15); }

.de-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
    padding: 6px 8px; border-bottom: 1px solid #eef0f4; background: #f8fafc;
    border-radius: 12px 12px 0 0; position: sticky; top: 0; z-index: 3;
}
.de-btn {
    border: 0; background: transparent; color: #334155; border-radius: 7px;
    min-width: 32px; height: 32px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center;
    font-size: .95rem; line-height: 1;
}
.de-btn:hover:not(:disabled) { background: #e8edf6; }
.de-btn.active { background: #dbe4ff; color: #3b4fd8; }
.de-btn:disabled { opacity: .4; }
.de-menu-btn { font-size: .82rem; font-weight: 500; }
.de-sep { width: 1px; height: 20px; background: #dfe3ea; margin: 0 5px; }
.de-spacer { flex: 1 1 auto; }
.de-style { width: auto; min-width: 9.5rem; height: 32px; font-size: .85rem; margin-right: 2px; }
.de-menu { max-height: 340px; overflow: auto; font-size: .88rem; }

.de-surface {
    min-height: 420px; max-height: 70vh; overflow: auto; padding: 22px 26px; outline: none;
    font-size: .95rem; line-height: 1.6; color: #1e293b;
}
.de-surface h4 { font-size: 1.15rem; font-weight: 700; color: #1d3a5f; margin: 1rem 0 .4rem; }
.de-surface h6, .de-surface h5 { font-size: .98rem; font-weight: 700; color: #1d3a5f; margin: .9rem 0 .3rem; }
.de-surface blockquote { border-left: 3px solid #c7d2fe; background: #f5f7ff; padding: .5rem .9rem; margin: .6rem 0; }
.de-surface table { width: 100%; border-collapse: collapse; margin: .5rem 0; }
.de-surface td, .de-surface th { border: 1px solid #dfe3ea; padding: 4px 8px; min-width: 40px; }
.de-surface p { margin: 0 0 .7rem; }
.de-surface a { color: #3b4fd8; }
.de-source { border: 0; border-radius: 0 0 12px 12px; min-height: 420px; font-size: .8rem; }
.de-status:empty { display: none; }
.de-status { padding: 0 10px 10px; }
.de-linkbox { position: absolute; top: 48px; left: 12px; right: 12px; z-index: 5; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid #dfe3ea; }

/* Placeholders */
.de-chip {
    display: inline-block; padding: 0 .45em; margin: 0 1px; border-radius: 6px; font-size: .86em; font-weight: 600;
    line-height: 1.55; white-space: nowrap; user-select: all; cursor: default; vertical-align: baseline;
}
.de-chip-company { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.de-chip-field { background: #fef3c7; color: #92400e; border: 1px dashed #f59e0b; }
.de-chip-other { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Live preview */
.de-preview-paper { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 28px 30px; box-shadow: 0 6px 22px rgba(15, 23, 42, .06); }
.de-preview-paper h4, .de-preview-paper h6 { color: #1d3a5f; font-weight: 700; }
.de-prev-blank { display: inline-block; min-width: 9em; border-bottom: 1.5px solid #64748b; color: #94a3b8; font-size: .82em; padding: 0 .3em; }
.de-prev-missing { background: #fee2e2; color: #991b1b; border-radius: 4px; padding: 0 .3em; font-size: .85em; }

/* Documents library page */
.doclib-section-title { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; margin: 1.5rem 0 .6rem; }
.doclib-card {
    border: 1px solid #eef0f4; border-radius: 14px; background: #fff; padding: 1rem 1.1rem; height: 100%;
    display: flex; flex-direction: column; gap: .5rem; transition: box-shadow .15s, border-color .15s;
}
.doclib-card:hover { border-color: #c7d2fe; box-shadow: 0 8px 24px rgba(102, 126, 234, .1); }
.doclib-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; flex: 0 0 40px; }
.doclib-icon.ref { background: #eef2ff; color: #4f46e5; }
.doclib-icon.sign { background: #ecfdf5; color: #047857; }
.doclib-icon.print { background: #fff7ed; color: #c2410c; }
.doclib-icon.gov { background: #f1f5f9; color: #334155; }
.doclib-icon.own { background: #fdf4ff; color: #a21caf; }
.doclib-title { font-weight: 600; color: #0f172a; line-height: 1.3; }
.doclib-meta { font-size: .8rem; color: #64748b; }
.doclib-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .35rem; }
.doclib-badge-std { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.doclib-badge-custom { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.doclib-badge-own { background: #fdf4ff; color: #a21caf; border: 1px solid #f5d0fe; }

/* Public document page (careers + employee portal) */
.docpage-paper { background: #fff; border-radius: 16px; box-shadow: 0 10px 34px rgba(15, 23, 42, .08); padding: clamp(18px, 4vw, 44px); }
.docpage-body { font-size: 1rem; line-height: 1.7; color: #1e293b; }
.docpage-body h4, .docpage-body h5, .docpage-body h6, .docpage-body h3 { color: #1d3a5f; font-weight: 700; margin-top: 1.3rem; }
.docpage-body ul { padding-left: 1.3rem; }
.docpage-body li { margin-bottom: .25rem; }
.docpage-body table { width: 100%; margin: .8rem 0; border-collapse: collapse; }
.docpage-body td, .docpage-body th { border: 1px solid #e5e7eb; padding: 6px 10px; vertical-align: top; }
@media print {
    .no-print { display: none !important; }
    .docpage-paper { box-shadow: none; padding: 0; }
}
