/* df-screencap v20260829-08 */

.dfsc-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: calc(100% - 20px);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* ── countdown chip  (small corner badge, not full-screen) ── */
.dfsc-cd-chip {
    position: fixed;
    bottom: 70px;
    right: 20px;
    z-index: 100001;
    background: rgba(44,62,80,0.92);
    color: #fff;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    white-space: nowrap;
    pointer-events: auto;
}
.dfsc-cd-chip .dfsc-cd-n {
    font-weight: bold;
    color: #f1c40f;
    font-size: 16px;
    min-width: 12px;
    text-align: center;
}
.dfsc-cd-cancel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.35);
    color: #ccc;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 2px;
}
.dfsc-cd-cancel:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ── crop overlay ─────────────────────────────── */
.dfsc-crop-ov {
    background: rgba(0,0,0,0.88);
    justify-content: flex-start;
    padding: 0;
}
.dfsc-crop-canvas {
    /* Custom orange-red crosshair with a white halo — the default system "crosshair"
       cursor is a thin black/white outline that can blend into a dark or busy captured
       image, making it look like it "disappears" while dragging. This stays visible
       against any background the captured screenshot happens to contain. */
    cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PGxpbmUgeDE9IjEwIiB5MT0iMSIgeDI9IjEwIiB5Mj0iMTkiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMyIvPjxsaW5lIHgxPSIxIiB5MT0iMTAiIHgyPSIxOSIgeTI9IjEwIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjMiLz48bGluZSB4MT0iMTAiIHkxPSIxIiB4Mj0iMTAiIHkyPSIxOSIgc3Ryb2tlPSIjZmY0NTAwIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxsaW5lIHgxPSIxIiB5MT0iMTAiIHgyPSIxOSIgeTI9IjEwIiBzdHJva2U9IiNmZjQ1MDAiIHN0cm9rZS13aWR0aD0iMS41Ii8+PC9zdmc+") 10 10, crosshair;
    display: block;
    flex: 1 1 auto;
    max-width: 100%;
    max-height: calc(100vh - 52px);
    align-self: center;
}
.dfsc-crop-bar {
    flex-shrink: 0;
    width: 100%;
    padding: 8px 14px;
    background: rgba(20,20,20,0.7);
    display: flex;
    align-items: center;
    gap: 8px;
}
.dfsc-crop-hint {
    color: #bbb;
    font-size: 16px;
    flex: 1 1 auto;
}
.dfsc-crop-dims {
    color: #aaa;
    font-size: 12px;
    min-width: 80px;
    text-align: right;
}
.dfsc-crop-cancel {
    color: #999 !important;
}
.dfsc-crop-cancel:hover {
    background: #c0392b !important;
    border-color: #c0392b !important;
    color: #fff !important;
}

/* ── annotate overlay ─────────────────────────── */
.dfsc-ann-ov {
    background: #111;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
}
.dfsc-toolbar {
    flex-shrink: 0;
    background: #1e1e1e;
    border-bottom: 1px solid #3a3a3a;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.dfsc-toolbar button {
    background: #3a3a3a;
    color: #ddd;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 5px 11px;
    font-size: 12px;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.12s;
    white-space: nowrap;
}
.dfsc-toolbar button:hover { background: #4a4a4a; }
.dfsc-toolbar button.active {
    background: #c0392b;
    border-color: #a93226;
    color: #fff;
}
.dfsc-tb-sep { flex: 1 1 auto; }
.dfsc-tb-dl {
    background: #2471a3 !important;
    border-color: #1a5276 !important;
    color: #fff !important;
}
.dfsc-tb-dl:hover { background: #2e86c1 !important; }
.dfsc-tb-close {
    background: transparent !important;
    border-color: #666 !important;
    color: #999 !important;
    font-size: 15px;
    padding: 4px 9px !important;
}
.dfsc-tb-close:hover {
    background: #c0392b !important;
    border-color: #c0392b !important;
    color: #fff !important;
}
.dfsc-ann-wrap {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: auto;
    display: flex;
    padding: 16px;
}
.dfsc-ann-canvas {
    cursor: crosshair;
    display: block;
    margin: auto;
    flex-shrink: 0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.6);
    /* width/height driven by JS zoom — no max-width constraint */
}
.dfsc-tb-arrowtag-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 2px 6px;
    vertical-align: middle;
}
.dfsc-tb-numval:disabled { opacity: 0.35; cursor: not-allowed; }
.dfsc-tb-numlabel {
    color: #ccc;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    margin-bottom: 0;
}
.dfsc-tb-numlabel input[type="checkbox"] { cursor: pointer; margin: 0; }
.dfsc-tb-numval {
    width: 44px;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 3px;
    color: #ddd;
    font-size: 12px;
    padding: 3px 4px;
    text-align: center;
}
.dfsc-tb-dimlabel {
    color: #777;
    font-size: 11px;
    padding: 0 6px 0 2px;
    align-self: center;
    white-space: nowrap;
}
.dfsc-tb-zoomlabel {
    color: #aaa;
    font-size: 12px;
    min-width: 38px;
    text-align: center;
    padding: 0 4px;
    align-self: center;
}
.dfsc-fields-row {
    flex-shrink: 0;
    background: #1a1a1a;
    border-bottom: 1px solid #3a3a3a;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dfsc-fields-row label {
    color: #ccc;
    font-size: 12px;
    margin: 0;
    white-space: nowrap;
}
.dfsc-fields-row input, .dfsc-fields-row select {
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 3px;
    color: #ddd;
    font-size: 12px;
    padding: 3px 6px;
}
.dfsc-fr-name, .dfsc-fr-des { width: 160px; }
.dfsc-fr-newclass { width: 140px; }
.dfsc-fr-msg {
    font-size: 12px;
    font-weight: bold;
    color: orangered;
    margin-left: auto;
    white-space: nowrap;
}
.dfsc-tb-savelib.dfsc-dirty {
    background: #2471a3 !important;
    border-color: #1a5276 !important;
    color: #fff !important;
}
.dfsc-tb-savelib.dfsc-dirty:hover { background: #2e86c1 !important; }

/* ── delay picker popup ───────────────────────── */
.dfsc-delay-popup {
    position: absolute;
    z-index: 100001;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    padding: 6px 8px;
    display: flex;
    align-items: stretch;
    gap: 6px;
    white-space: nowrap;
}
.dfsc-dp-sep {
    width: 1px;
    background: #ddd;
    margin: 2px 0;
    flex-shrink: 0;
}
.dfsc-delay-popup.dfsc-delay-fixed {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: auto;
    z-index: 99999; /* below .dfsc-overlay (100000) — stays in the DOM permanently now (see df-screencap.js), so the crop/annotate overlay must visually cover it while shown */
    justify-content: flex-end;
    border-width: 0 0 1px 1px;
    border-radius: 0 0 0 4px;
    padding: 14px 16px;
}
.dfsc-delay-fixed .btn { font-size: 13px; padding: 6px 12px; }

/* ── option B: modal header camera button ─────── */
.dfsc-modal-cam {
    position: absolute;
    font-size: 13px;
    line-height: 1;
    color: #888;
    background: transparent;
    border: none;
    padding: 0 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.12s, color 0.12s;
}
.dfsc-modal-cam:hover { opacity: 1; color: #2c3e50; }
