/*
 * OtoLider — wspólny bazowy CSS formularza dodawania ogłoszenia.
 * Punkt 11: wyłącznie reguły identyczne dla wszystkich 19 aktywnych kategorii.
 *
 * Nie obejmuje: topbara portalu, podglądu LIVE / snapshotu dealera,
 * stylów specyficznych dla kategorii ani lokalnych reguł @media.
 */

:root {
    --lm-blue: #314f6f;
    --lm-blue-dark: #263f5d;
    --lm-red: #d52e2c;
    --lm-line: #d9dde3;
    --lm-text: #2b3948;
    --lm-muted: #728091;
    --lm-bg: #ffffff;
    --lm-card: #fff;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body { font-family: Arial, Helvetica, sans-serif; background: #fff; color: var(--lm-text); font-size: 12px; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

select, input, textarea, button { font: inherit; }

.container { width: min(1240px, calc(100% - 24px)); margin: 0 auto; }

.lm-page { min-height: 100vh; }

.lm-wrap { width: min(1040px, calc(100% - 24px)); margin: 26px auto 46px; background: #fff; }

.lm-switches { width: min(640px, 100%); margin: 0 auto 12px; }

.lm-switch-row { display: grid; grid-template-columns: repeat(2, 1fr); height: 38px; }

.lm-switch { display: flex; align-items: center; justify-content: center; background: #e9e9e9; color: #314f6f; font-weight: 700; border-right: 1px solid #fff; }

.lm-switch:first-child { border-radius: 7px 0 0 7px; }

.lm-switch:last-child { border-right: 0; border-radius: 0 7px 7px 0; }

.lm-switch.is-active { background: var(--lm-blue); color: #fff; }

.lm-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }

.lm-step { background: #e9e9e9; color: #111; font-weight: 700; padding: 9px 12px; display: flex; align-items: center; gap: 8px; border-radius: 7px; }

.lm-step span { background: #fff; color: var(--lm-blue); min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; border-radius: 4px; }

.lm-step.is-active { background: var(--lm-blue); color: #fff; }

.lm-title-strip { background: var(--lm-blue); color: #fff; min-height: 42px; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 800; margin: 14px -999px 14px; padding: 0 999px; }

.lm-title-strip.is-generated { letter-spacing: .2px; }

.lm-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }

.lm-section { background: #fff; border: 0; }

.lm-section-head { display: grid; grid-template-columns: 240px 1fr; min-height: 38px; background: #ededed; margin-bottom: 18px; border-radius: 7px; overflow: hidden; }

.lm-section-head h2 { margin: 0; background: var(--lm-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }

.lm-section-body { padding: 0 24px 24px; }

.lm-card { background: #fff; border: 0; padding: 0; }

.lm-card h2 { margin: 0; font-size: 13px; }

.lm-card-note { color: #5f6b78; margin: 0 0 14px; line-height: 1.5; }

.lm-form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; margin-bottom: 16px; }

.lm-form-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.lm-form-row.one { grid-template-columns: 1fr; }

.lm-field label { display: block; font-weight: 700; margin-bottom: 6px; color: #33465a; }

.lm-field input[type="text"], .lm-field input[type="email"], .lm-field input[type="tel"], .lm-field input[type="number"], .lm-field input[type="date"], .lm-field select, .lm-field textarea {
    width: 100%; border: 1px solid #bfc7d1; background: #fff; color: #111827; border-radius: 6px; padding: 7px 8px; font-size: 12px; outline: none; min-height: 30px;
}

.lm-combo-suggest-item { padding: 9px 10px; cursor: pointer; border-bottom: 1px solid #eef2f7; font-weight: 700; color: #1f344d; }

.lm-combo-suggest-item:last-child { border-bottom: 0; }

.lm-combo-suggest-item:hover, .lm-combo-suggest-item.is-active { background: #eff6ff; color: var(--lm-blue); }

.lm-combo-suggest-empty { padding: 9px 10px; color: #6b7280; font-weight: 600; }

.lm-field input:disabled, .lm-field select:disabled {
    background: #eef1f5;
    color: #7b8794;
    cursor: not-allowed;
    opacity: 1;
}

.lm-section.lm-smooth-panel { overflow: hidden; max-height: 1600px; opacity: 1; transform: translateY(0); transition: max-height .25s ease, opacity .2s ease, transform .2s ease, margin .2s ease; }

.lm-section.lm-smooth-panel.is-collapsed { max-height: 0; opacity: 0; transform: translateY(-5px); margin: 0; pointer-events: none; }

.lm-select-clear-wrap { position: relative; }

.lm-combo-wrap::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #5f6b78;
    pointer-events: none;
    opacity: .85;
}

.lm-combo-wrap.has-value::after,
.lm-combo-wrap:has(.lm-combo-input:not(:placeholder-shown))::after,
.lm-combo-wrap:has(.lm-combo-input:disabled)::after { display: none; }

.lm-select-clear-wrap select {
    padding-right: 30px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
}

.lm-select-clear {
    display: none;
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #516173;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.lm-select-clear:hover { color: #d52e2c; }

.lm-select-clear.is-visible { display: inline-flex; align-items: center; justify-content: center; }

.lm-clearable-wrap { position: relative; }

.lm-clearable-wrap > input,
.lm-clearable-wrap > select { padding-right: 30px !important; }

.lm-clearable-select > select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
}

.lm-clearable-select::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #5f6b78;
    pointer-events: none;
    opacity: .85;
}

.lm-clearable-wrap.has-value::after,
.lm-clearable-wrap.has-clear-visible::after,
.lm-clearable-wrap.is-disabled::after { display: none; }

.lm-control-clear {
    display: none;
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #516173;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    z-index: 3;
}

.lm-control-clear:hover { color: #d52e2c; }

.lm-control-clear.is-visible { display: inline-flex; align-items: center; justify-content: center; }

.lm-date-clickable { cursor: pointer; }

.lm-choice-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; min-height: 34px; }

.lm-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #33465a;
    font-weight: 800;
    cursor: pointer;
}

.lm-choice input { margin: 0; accent-color: var(--lm-blue); }

.lm-choice:has(input:checked) { color: var(--lm-blue); }

.lm-field input:focus, .lm-field select:focus, .lm-field textarea:focus { border-color: var(--lm-blue); box-shadow: 0 0 0 2px rgba(49,79,111,0.12); }

.lm-field.is-invalid input,
.lm-field.is-invalid select,
.lm-field.is-invalid textarea,
.lm-field.is-invalid .lm-combo-input { border-color: #dc2626 !important; box-shadow: 0 0 0 2px rgba(220,38,38,0.10) !important; }

.lm-field.is-invalid .lm-checks {
    border-left: 3px solid #dc2626;
    padding-left: 12px;
}

.lm-field.is-invalid .lm-checks-title,
.lm-field.is-invalid .lm-check span { color: #b91c1c; }

.lm-field-error-msg { display: block; margin-top: 6px; color: #b91c1c; font-size: 12px; font-weight: 800; line-height: 1.35; }

.lm-field textarea { min-height: 150px; resize: vertical; }

.lm-help { display: block; color: #6b7280; font-size: 12px; margin-top: 6px; line-height: 1.4; }

.lm-inline-check { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; color: #33465a; font-size: 13px; font-weight: 800; cursor: pointer; }

.lm-inline-check input { margin: 0; }

.lm-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 22px; }

.lm-check { display: flex; gap: 7px; align-items: flex-start; font-weight: 700; color: #1f2937; }

.lm-check input { margin-top: 1px; }

.lm-radio-checks .lm-check { border: 1px solid #cfd7e1; border-radius: 7px; padding: 10px 12px; background: #fff; }

.lm-radio-checks .lm-check:has(input:checked) { border-color: var(--lm-blue); background: #eff6ff; box-shadow: 0 0 0 2px rgba(49,79,111,0.10); }

.lm-checks-title { margin: 18px 0 12px; padding-top: 18px; border-top: 1px solid #8f98a3; color: #314f6f; font-size: 16px; }

.lm-checks-title.lm-checks-title-plain { margin-top: 14px; padding-top: 0; border-top: 0; }

.lm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 22px; }

.lm-button { border: 0; background: var(--lm-blue); color: #fff; padding: 12px 24px; font-size: 13px; font-weight: 800; cursor: pointer; min-width: 170px; border-radius: 7px; }

.lm-button-secondary { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #bfc7d1; background: #fff; color: #314f6f; padding: 11px 18px; font-weight: 800; border-radius: 7px; }

.lm-muted { color: #6b7280; }

.lm-alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; line-height: 1.5; border: 1px solid transparent; }

.lm-alert-error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.lm-alert-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }

.lm-alert-info { background: #eff6ff; color: #1e3a8a; border-color: #bfdbfe; }

.lm-section-line { border: 0; border-top: 1px solid #8f98a3; margin: 18px 0; }

.lm-dropzone { border: 1px solid #aeb7c2; height: 130px; display: flex; align-items: center; justify-content: center; color: #4b5563; background: #fff; border-radius: 7px; }

.lm-photo-dropzone { border: 1px dashed #8ea0b5; min-height: 150px; border-radius: 10px; background: #f8fafc; display: flex; align-items: center; justify-content: center; text-align: center; color: #334155; cursor: pointer; padding: 18px; transition: border-color .15s ease, background .15s ease; }

.lm-photo-dropzone:hover, .lm-photo-dropzone.is-dragover { border-color: var(--lm-blue); background: #eef6ff; }

.lm-photo-dropzone input[type="file"] { display: none; }

.lm-photo-dropzone strong { display: block; font-size: 15px; margin-bottom: 4px; }

.lm-photo-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }

.lm-photo-card { border: 1px solid #d6dde7; border-radius: 10px; background: #fff; overflow: hidden; position: relative; box-shadow: 0 1px 2px rgba(15,23,42,.06); }

.lm-photo-thumb { aspect-ratio: 4 / 3; background: #e5e7eb; display: block; width: 100%; object-fit: cover; }

.lm-photo-meta { padding: 8px; font-size: 12px; color: #475569; display: grid; gap: 6px; }

.lm-photo-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lm-photo-badge { position: absolute; top: 7px; left: 7px; background: rgba(0,72,142,.92); color: #fff; padding: 3px 7px; font-size: 11px; border-radius: 999px; font-weight: 800; }

.lm-photo-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.lm-photo-actions button { border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 6px; padding: 5px 7px; font-size: 11px; cursor: pointer; }

.lm-photo-actions button:hover { background: #eef2f7; }

.lm-photo-message { margin-top: 10px; font-size: 12px; color: #b91c1c; font-weight: 700; }

.lm-photo-clear { margin-top: 10px; border: 1px solid #cbd5e1; background: #fff; border-radius: 7px; padding: 7px 10px; cursor: pointer; font-weight: 700; }

.lm-photo-clear:hover { background: #f8fafc; }

.lm-existing-photos { margin: 12px 0 14px; }

.lm-existing-photos-title { font-weight: 700; color: var(--lm-blue-dark); margin-bottom: 8px; }

.lm-existing-photos-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
