/* ── LAPD Traffic Accident Analysis Plugin ── v1.0.2 ── Mobile First ── */

* {
    box-sizing: border-box;
}

html {
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
}

body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-x: hidden;
}

/* Force any theme wrappers that might block scroll */
#page,
#content,
#main,
.site,
.site-content,
.entry-content,
.wp-site-blocks {
    overflow: visible !important;
    height: auto !important;
    min-height: unset !important;
}

.lapd-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px 12px 80px;
    font-family: 'Arial', sans-serif;
    color: #dde;
    background: #111;
    overflow: visible !important;
    height: auto !important;
    position: relative;
}

/* Header */
.lapd-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #334;
}
.lapd-badge {
    background: #003087;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    padding: 8px 14px;
    border-radius: 6px;
    letter-spacing: 2px;
    border: 2px solid #4466cc;
    white-space: nowrap;
    flex-shrink: 0;
}
.lapd-title {
    font-size: clamp(16px, 5vw, 22px);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.lapd-sub {
    font-size: clamp(11px, 3vw, 13px);
    color: #889;
    margin-top: 3px;
    line-height: 1.3;
}

/* Fields */
.lapd-field {
    margin-bottom: 18px;
}
.lapd-label {
    display: block;
    color: #ff9900;
    font-size: clamp(13px, 3.5vw, 16px);
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 1px;
}
.lapd-input {
    width: 100%;
    height: 56px;
    background: #1a1a2e;
    border: 2px solid #556;
    border-radius: 6px;
    color: #dde;
    font-size: 16px;
    padding: 0 14px;
    -webkit-appearance: none;
    appearance: none;
}
.lapd-input:focus {
    outline: none;
    border-color: #4466cc;
}

/* Dropzone */
.lapd-dropzone {
    position: relative;
    border: 2px dashed #556;
    border-radius: 8px;
    background: #1a1a2e;
    min-height: 130px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
    touch-action: manipulation;
}
.lapd-dropzone.lapd-drag-over {
    border-color: #ff9900;
    background: #1e1e10;
}
.lapd-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
    font-size: 16px;
}
.lapd-drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    gap: 6px;
}
.lapd-drop-icon {
    font-size: 32px;
}
.lapd-drop-text {
    color: #aab;
    font-size: clamp(15px, 4vw, 18px);
    text-align: center;
}
.lapd-drop-hint {
    color: #778;
    font-size: 13px;
}
.lapd-preview {
    display: none;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 6px;
}

/* Buttons */
.lapd-btn-action {
    display: block;
    width: 100%;
    height: 80px;
    background: #003087;
    color: #fff;
    font-size: clamp(16px, 4.5vw, 20px);
    font-weight: 900;
    letter-spacing: 2px;
    border: 2px solid #4466cc;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 6px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.2s;
}
.lapd-btn-action:active { background: #004bb5; }
.lapd-btn-action:disabled { opacity: 0.5; cursor: default; }

/* Status */
.lapd-status {
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: 6px;
    font-size: clamp(14px, 3.8vw, 17px);
    border: 2px solid #556;
    line-height: 1.5;
}
.lapd-status--info  { background: #0d1a2e; border-color: #446; color: #aac; }
.lapd-status--error { background: #2e0d0d; border-color: #844; color: #f88; }

/* Report */
.lapd-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.lapd-report-badge {
    background: #003087;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 4px;
    letter-spacing: 1px;
    border: 2px solid #4466cc;
}
.lapd-btn-print {
    height: 46px;
    padding: 0 16px;
    background: #1a1a2e;
    border: 2px solid #556;
    color: #dde;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.lapd-btn-print:active { border-color: #ff9900; color: #ff9900; }

.lapd-report {
    background: #0d0d1a;
    border: 2px solid #334;
    border-radius: 8px;
    padding: 16px;
    font-size: clamp(14px, 3.8vw, 17px);
    line-height: 1.75;
    color: #dde;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.lapd-section-head {
    color: #ff9900;
    font-weight: 700;
    font-size: clamp(13px, 3.5vw, 16px);
    letter-spacing: 1px;
    margin-top: 20px;
    margin-bottom: 6px;
    border-bottom: 1px solid #334;
    padding-bottom: 4px;
}

/* Prevent iOS input zoom */
input, select, textarea {
    font-size: 16px;
}

@media print {
    .lapd-header, form, .lapd-status, .lapd-btn-print { display: none !important; }
    .lapd-wrap { background: #fff; color: #000; padding: 0; }
    .lapd-report { border: 1px solid #ccc; background: #fff; color: #000; }
    .lapd-section-head { color: #003087; }
}