/* ============================================================================
   COORDINATE PICKER — coordinate-picker.css
   ============================================================================ */

/* ── Hero ───────────────────────────────────────────────────────────────── */
.cp-hero {
    padding: 120px 0 56px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
}

.cp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.3);
    color: #fde68a;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.cp-hero h1 {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 16px;
}

.cp-highlight {
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cp-hero p {
    font-size: 17px;
    color: rgba(255,255,255,0.75);
    line-height: 1.75;
    max-width: 620px;
    margin-bottom: 28px;
}

.cp-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cp-hero-tags span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.cp-hero-tags span i { color: #f59e0b; font-size: 12px; }

/* ── Tool Section ───────────────────────────────────────────────────────── */
.cp-tool { padding: 40px 0 100px; background: #f9fafb; }

/* ── Toolbar ────────────────────────────────────────────────────────────── */
.cp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cp-toolbar-left, .cp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cp-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-size: 13.5px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.2s;
}

.cp-upload-btn:hover { opacity: 0.88; }
.cp-upload-btn input { display: none; }

.cp-page-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cp-btn-icon {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s;
}

.cp-btn-icon:hover { background: #f9fafb; border-color: #d1d5db; }

.cp-page-controls select {
    font-size: 13px;
    padding: 5px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    background: #f9fafb;
    color: #111827;
    font-family: 'Inter', sans-serif;
}

.cp-page-total { font-size: 13px; color: #9ca3af; }

.cp-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

.cp-btn-ghost:hover { background: #f9fafb; border-color: #d1d5db; }
.cp-btn-danger:hover { background: #fef2f2 !important; border-color: #fca5a5 !important; color: #ef4444 !important; }

/* ── Grid ───────────────────────────────────────────────────────────────── */
.cp-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    align-items: start;
}

/* ── Drop Zone ──────────────────────────────────────────────────────────── */
.cp-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 14px;
    padding: 60px 32px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}

.cp-dropzone:hover, .cp-dropzone.drag {
    border-color: #f59e0b;
    background: #fffbeb;
}

.cp-dropzone i {
    font-size: 44px;
    color: #d1d5db;
    display: block;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.cp-dropzone:hover i, .cp-dropzone.drag i { color: #f59e0b; }

.cp-dropzone p {
    font-size: 16px;
    color: #374151;
    font-weight: 500;
    margin-bottom: 8px;
}

.cp-dropzone p span { color: #1e40af; text-decoration: underline; }

.cp-dropzone small {
    font-size: 12.5px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.cp-dropzone small i { color: #10b981; }

/* ── Canvas Wrap ────────────────────────────────────────────────────────── */
.cp-canvas-wrap {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    width: 100%;
}

#pdfCanvas,
#overlay {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.cp-viewer-col {
    min-width: 0;
}

#overlay {
    position: absolute;
    left: 0;
    top: 0;
    cursor: crosshair;
}

.cp-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    white-space: nowrap;
}

/* ── Coord Info ─────────────────────────────────────────────────────────── */
.cp-coord-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 12px;
    line-height: 1.55;
}

.cp-coord-info i { color: #f59e0b; flex-shrink: 0; margin-top: 1px; }

/* ── Output Column ──────────────────────────────────────────────────────── */
.cp-output-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 100px;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.cp-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.cp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f3f4f6;
    gap: 10px;
    flex-wrap: wrap;
}

.cp-card-head h3 {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-card-head h3 i { color: #f59e0b; }

.cp-count {
    font-size: 12px;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
    padding: 3px 9px;
    border-radius: 10px;
}

/* ── Empty ──────────────────────────────────────────────────────────────── */
.cp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    color: #9ca3af;
    text-align: center;
}

.cp-empty i { font-size: 32px; opacity: 0.35; }
.cp-empty p { font-size: 13px; line-height: 1.6; max-width: 220px; }

/* ── Table ──────────────────────────────────────────────────────────────── */
.cp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cp-table thead tr { background: #f9fafb; }

.cp-table th {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.cp-table td {
    padding: 9px 10px;
    color: #374151;
    border-bottom: 1px solid #f9fafb;
    font-variant-numeric: tabular-nums;
}

.cp-table tbody tr:last-child td { border-bottom: none; }
.cp-table tbody tr:hover td { background: #fffbeb; }

.cp-box-id {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.cp-del {
    width: 26px;
    height: 26px;
    border: none;
    background: none;
    color: #d1d5db;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.15s;
}

.cp-del:hover { background: #fef2f2; color: #ef4444; }

/* ── Format Tabs ────────────────────────────────────────────────────────── */
.cp-fmt-tabs {
    display: flex;
    gap: 3px;
    background: #f3f4f6;
    border-radius: 7px;
    padding: 3px;
}

.cp-fmt {
    padding: 4px 10px;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

.cp-fmt.active {
    background: #fff;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ── Code Block ─────────────────────────────────────────────────────────── */
.cp-code-wrap {
    position: relative;
    background: #0f172a;
}

.cp-code-wrap pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    max-height: 320px;
}

.cp-code-wrap pre code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre;
}

.cp-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #94a3b8;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s;
}

.cp-copy-btn:hover { background: rgba(255,255,255,0.14); color: #e2e8f0; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .cp-grid { grid-template-columns: 1fr; }
    .cp-output-col { position: static; }
    .cp-hero h1 { font-size: 32px; }
}

@media (max-width: 640px) {
    .cp-toolbar { flex-direction: column; align-items: flex-start; }
    .cp-hero-tags { gap: 8px; }
    .cp-hero h1 { font-size: 26px; }
}