/* Praxis Vocab Identifier v3.0 */

.pv-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 760px;
    margin: 1.5rem 0;
    color: #1a1a1a;
}

.pv-header   { margin-bottom: 1rem; }
.pv-title    { font-size: 16px; font-weight: 600; display: block; margin-bottom: 4px; }
.pv-hint     { font-size: 13px; color: #666; margin: 0; }

/* Dropzone */
.pv-dropzone {
    border: 2px dashed #b0b8c4;
    border-radius: 10px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    background: #f9fafb;
    position: relative;
    transition: background .15s, border-color .15s;
}
.pv-dropzone:hover,
.pv-dropzone:focus      { background: #f0f4f8; border-color: #4a90d9; outline: none; }
.pv-dropzone.pv-over    { background: #e8f0fb; border-color: #2563eb; }

.pv-drop-icon  { font-size: 34px; margin-bottom: 8px; line-height: 1; }
.pv-drop-text  { font-size: 15px; color: #444; margin-bottom: 4px; }
.pv-drop-sub   { font-size: 13px; color: #888; }

.pv-file-input {
    position: absolute; inset: 0; opacity: 0;
    cursor: pointer; width: 100%; height: 100%;
}

/* Main layout */
.pv-main         { display: flex; flex-direction: column; gap: 20px; margin-top: 12px; }
.pv-img-section  { display: flex; flex-direction: column; gap: 0; }
.pv-vocab-section{ display: flex; flex-direction: column; gap: 8px; }

.pv-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: #666; margin-bottom: 8px;
}
.pv-editable-note { font-weight: 400; text-transform: none; letter-spacing: 0; color: #999; }

/* Canvas (analyzer) */
.pv-canvas {
    display: block; max-width: 100%; height: auto;
    border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.14);
}

/* Preview image (vocab widgets) */
.pv-preview-img {
    display: block; max-width: 100%; height: auto;
    border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.14);
}

/* Controls */
.pv-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.pv-btn {
    background: #f4f5f7; border: 1px solid #d0d5dd;
    border-radius: 7px; padding: 7px 14px; font-size: 13px;
    cursor: pointer; color: #333; font-family: inherit;
    display: inline-flex; align-items: center; gap: 5px;
    transition: background .12s, transform .1s;
}
.pv-btn:hover   { background: #e9ebed; }
.pv-btn:active  { transform: scale(.97); }
.pv-btn:disabled{ opacity: .5; cursor: not-allowed; transform: none; }

.pv-btn-primary {
    background: #2563eb; border-color: #1d4ed8;
    color: #fff; font-weight: 600;
}
.pv-btn-primary:hover { background: #1d4ed8; }

/* Status */
.pv-status       { font-size: 13px; color: #555; margin-top: 8px; min-height: 20px; }
.pv-status.ok    { color: #1a7a4a; }
.pv-status.err   { color: #c0392b; }

/* Vocab textarea */
.pv-vocab-box {
    width: 100%; min-height: 200px;
    border: 1px solid #d0d5dd; border-radius: 8px;
    padding: 12px 14px; font-family: "Courier New", monospace;
    font-size: 14px; line-height: 1.75; resize: vertical;
    color: #1a1a1a; background: #fff; box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.pv-vocab-box:focus {
    outline: none; border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.pv-vocab-actions { margin-top: 8px; }

.pv-btn-copy.copied { background: #d1fae5; border-color: #34d399; color: #065f46; }

/* Spinner */
.pv-spin {
    display: inline-block; width: 13px; height: 13px;
    border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
    border-radius: 50%; animation: pv-spin .7s linear infinite; vertical-align: middle;
}
@keyframes pv-spin { to { transform: rotate(360deg); } }

@media (max-width: 500px) {
    .pv-controls { flex-direction: column; }
    .pv-btn      { width: 100%; justify-content: center; }
}

/* ── Step layout v4.0 ── */
.pv-step { margin-bottom: 20px; }

.pv-step-label {
    font-size: 13px; font-weight: 600;
    color: #2563eb; margin-bottom: 10px;
    padding: 6px 10px; background: #eff6ff;
    border-left: 3px solid #2563eb;
    border-radius: 0 6px 6px 0;
    display: inline-block;
}

.pv-preview-row { margin-bottom: 10px; }
.pv-preview-img {
    display: block; max-width: 100%; height: auto;
    border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.14);
}

.pv-step-result { border-top: 1px solid #e5e7eb; padding-top: 20px; }
