/* AW.BY — стили формы подачи объявления */
.awby-add-wrap { max-width: 900px; margin: 0 auto; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #333; }

/* --- прогресс шагов --- */
.awby-steps { display: flex; gap: 4px; margin-bottom: 28px; counter-reset: step; }
.awby-step {
    flex: 1; text-align: center; padding: 12px 6px; position: relative;
    background: #f0f2f5; border-radius: 6px 6px 0 0; font-size: 13px; color: #888;
    transition: all .25s;
}
.awby-step .awby-step-num {
    display: inline-flex; width: 26px; height: 26px; border-radius: 50%;
    background: #c8d0d8; color: #fff; font-weight: 700; align-items: center; justify-content: center;
    margin-right: 6px; font-size: 13px;
}
.awby-step.active { background: #719DE4; color: #fff; }
.awby-step.active .awby-step-num { background: #2a4a6a; }
.awby-step.done { background: #e8f0e8; color: #4a8a4a; }
.awby-step.done .awby-step-num { background: #4CAF50; }
.awby-step-name { display: none; }
@media (min-width: 768px) { .awby-step-name { display: inline; } }

/* --- филдсеты (шаги) --- */
.awby-fieldset { display: none; animation: awby-fade .3s ease; }
.awby-fieldset.active { display: block; }
@keyframes awby-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.awby-fieldset-title {
    color: #2a4a6a; font-size: 22px; margin: 0 0 6px;
    border-bottom: 2px solid #719DE4; padding-bottom: 8px;
}
.awby-hint { color: #777; font-size: 14px; margin: 0 0 20px; }
.awby-subtitle { color: #2a4a6a; font-size: 16px; margin: 24px 0 12px; }
.awby-badge { background: #ff8c00; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; vertical-align: middle; font-weight: 600; }

/* --- сетка категорий --- */
.awby-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.awby-cat-card {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    border: 2px solid #e1e5ea; border-radius: 10px; padding: 20px 12px; cursor: pointer;
    transition: all .2s; text-align: center; background: #fcfcfd;
}
.awby-cat-card:hover { border-color: #719DE4; background: #f5f9ff; }
.awby-cat-card input { position: absolute; opacity: 0; }
.awby-cat-card input:checked ~ .awby-cat-name { color: #719DE4; }
.awby-cat-card:has(input:checked) { border-color: #719DE4; background: #eef4fb; box-shadow: 0 0 0 3px rgba(113,157,228,.15); }
.awby-cat-emoji { font-size: 34px; }
.awby-cat-name { font-weight: 700; color: #2a4a6a; font-size: 15px; }
.awby-cat-desc { font-size: 12px; color: #888; }

/* --- поля --- */
.awby-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .awby-row { grid-template-columns: 1fr; } }
.awby-field { margin-bottom: 16px; }
.awby-field label { display: block; font-weight: 600; margin-bottom: 5px; color: #444; font-size: 14px; }
.awby-req { color: #ff0000; }
.awby-field input, .awby-field select, .awby-field textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #cfd6dd; border-radius: 6px;
    font-size: 15px; font-family: inherit; transition: border .2s, box-shadow .2s; box-sizing: border-box;
}
.awby-field input:focus, .awby-field select:focus, .awby-field textarea:focus {
    outline: none; border-color: #719DE4; box-shadow: 0 0 0 3px rgba(113,157,228,.15);
}
.awby-field textarea { resize: vertical; }
.awby-field-note { display: block; font-size: 12px; color: #888; margin-top: 4px; }
.awby-field-price input { font-size: 18px; font-weight: 700; }

/* поле, автозаполненное из каталога — голубая подсветка */
.awby-field input.awby-auto-filled,
.awby-field select.awby-auto-filled {
    background: #eef6ff;
    border-color: #719DE4;
    box-shadow: 0 0 0 2px rgba(113,157,228,.18);
}

/* --- панель автоподтягивания из каталога --- */
.awby-catalog-link {
    border: 1px solid #b8d4f0;
    border-radius: 10px;
    background: linear-gradient(135deg,#f0f7ff,#e8f3fe);
    padding: 16px 18px;
    margin-bottom: 16px;
    overflow: hidden;
    animation: awby-fade .3s ease;
}
.awby-catalog-link__head {
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.awby-catalog-link__icon { font-size: 20px; }
.awby-catalog-link__title { font-weight: 700; color: #2a4a6a; font-size: 15px; }
.awby-catalog-link__body { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.awby-catalog-link__body select {
    flex: 1; min-width: 260px; padding: 9px 12px; border: 1px solid #cfd6dd;
    border-radius: 6px; font-size: 14px; font-family: inherit;
}
.awby-catalog-link__open {
    color: #719DE4; font-weight: 600; font-size: 13px; text-decoration: none;
    white-space: nowrap;
}
.awby-catalog-link__open:hover { text-decoration: underline; }
.awby-catalog-link__hint {
    font-size: 12px; color: #6a7d92; margin: 10px 0 0; flex-basis: 100%;
}
@media (max-width: 600px) {
    .awby-catalog-link__body select { min-width: 100%; }
}

/* --- дропзона фото --- */
.awby-dropzone {
    border: 2px dashed #c4d2e0; border-radius: 10px; padding: 36px; text-align: center;
    background: #fcfcfd; cursor: pointer; transition: all .2s; margin-bottom: 16px; position: relative;
}
.awby-dropzone:hover, .awby-dropzone.dragover { border-color: #719DE4; background: #f0f6ff; }
.awby-dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.awby-dropzone-icon { font-size: 42px; }
.awby-dropzone-inner p { margin: 8px 0 0; color: #555; }
.awby-link { color: #719DE4; font-weight: 600; text-decoration: underline; }
.awby-dropzone-hint { font-size: 12px; color: #999 !important; }
.awby-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.awby-preview-item { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid #e1e5ea; aspect-ratio: 4/3; }
.awby-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.awby-preview-item .awby-preview-main { position: absolute; top: 4px; left: 4px; background: #ff8c00; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.awby-preview-item .awby-preview-remove { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; border: none; cursor: pointer; font-size: 14px; width: 22px; height: 22px; border-radius: 50%; line-height: 1; }

/* --- услуги --- */
.awby-services { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
@media (max-width: 600px) { .awby-services { grid-template-columns: 1fr; } }
.awby-service { display: flex; gap: 12px; border: 1px solid #e1e5ea; border-radius: 8px; padding: 14px; cursor: pointer; transition: all .2s; background: #fcfcfd; align-items: flex-start; }
.awby-service:hover { border-color: #719DE4; }
.awby-service input { margin-top: 3px; accent-color: #719DE4; transform: scale(1.2); }
.awby-service input:checked ~ .awby-service-body .awby-service-name { color: #ff8c00; }
.awby-service:has(input:checked) { border-color: #ff8c00; background: #fff8ef; }
.awby-service-body { display: flex; flex-direction: column; gap: 2px; }
.awby-service-name { font-weight: 700; color: #2a4a6a; font-size: 14px; }
.awby-service-desc { font-size: 12px; color: #777; }
.awby-service-price { font-size: 13px; font-weight: 700; color: #ff0000; margin-top: 4px; }

/* --- согласие --- */
.awby-consent { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; font-size: 13px; color: #555; }
.awby-consent input { margin-top: 3px; accent-color: #719DE4; }
.awby-consent a { color: #719DE4; }

/* --- кнопки --- */
.awby-nav { display: flex; justify-content: space-between; margin-top: 28px; }
.awby-btn {
    background: #719DE4; color: #fff; border: none; padding: 12px 28px; border-radius: 6px;
    font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s; font-family: inherit;
}
.awby-btn:hover { background: #4a90d9; }
.awby-btn-ghost { background: transparent; color: #555; border: 1px solid #cfd6dd; }
.awby-btn-ghost:hover { background: #f0f2f5; }
.awby-submit { background: #ff8c00; font-size: 16px; padding: 14px 36px; }
.awby-submit:hover { background: #e07d00; }
.awby-submit:disabled { opacity: .6; cursor: wait; }

/* --- результат --- */
.awby-result { text-align: center; padding: 40px 20px; }
.awby-result-icon { font-size: 56px; margin-bottom: 16px; }
.awby-result h2 { color: #2a4a6a; margin: 0 0 10px; }
.awby-result p { color: #666; max-width: 480px; margin: 0 auto 20px; line-height: 1.6; }
.awby-result-meta { background: #f5f9ff; border: 1px solid #d6e4f5; border-radius: 8px; padding: 16px; display: inline-block; text-align: left; font-size: 13px; color: #444; }

/* --- уведомления --- */
.awby-notice { padding: 24px; border-radius: 10px; max-width: 900px; margin: 20px auto; }
.awby-notice-warn { background: #fff8e1; border: 1px solid #ffd54f; }
.awby-notice h3 { margin: 0 0 8px; color: #b8860b; }
.awby-notice p { margin: 0 0 12px; color: #5d4a1a; }

/* --- optgroup в выпадающих списках марок --- */
#awby_make optgroup { font-style: normal; font-weight: 600; color: #2a4a6a; }
#awby_make optgroup option { font-weight: 400; color: #333; padding-left: 16px; }
#awby_make option { padding: 6px 8px; }

/* --- индикатор загрузки моделей --- */
#awby_model[disabled] option:first-child { color: #999; font-style: italic; }
.awby-field select { background: #fff; }

/* ===== БАЛЛЫ И УСЛУГИ (с ценами) ===== */
.awby-consent--save { margin: 8px 0 4px; font-size: 13px; color: #555; }

.awby-points-balance {
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #fff8e1, #fff3c4);
    border: 1px solid #ffd54f; border-radius: 10px;
    padding: 10px 16px; margin: 12px 0 16px; font-size: 14px;
}
.awby-points-balance__icon { font-size: 18px; }
.awby-points-balance__label { color: #666; }
.awby-points-balance__value { font-size: 20px; font-weight: 800; color: #e07d00; }
.awby-points-balance__unit { color: #999; font-size: 12px; }
.awby-points-balance__topup { margin-left: auto; color: #2a6a9a; text-decoration: none; font-size: 13px; font-weight: 600; }
.awby-points-balance__topup:hover { text-decoration: underline; }

.awby-services--priced .awby-service {
    border: 2px solid #e8ecf1; border-radius: 10px; padding: 12px 14px;
    margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s;
    display: flex; align-items: flex-start; gap: 10px;
}
.awby-services--priced .awby-service:hover { border-color: #ff8c00; background: #fffaf3; }
.awby-services--priced .awby-service.is-selected { border-color: #ff8c00; background: #fff5e8; }
.awby-services--priced .awby-service--affordable .awby-service-price__points.is-ok { color: #2e7d32; font-weight: 700; }
.awby-services--priced .awby-service-price__points.is-low { color: #c62828; }
.awby-service-price__sep { color: #ccc; margin: 0 4px; }
.awby-service-price__byn { color: #555; font-weight: 600; }
.awby-service-price__dur { color: #999; font-size: 12px; }

.awby-pay-method { background: #f5f9ff; border: 1px solid #d6e4f5; border-radius: 10px; padding: 14px 16px; margin: 14px 0 8px; }
.awby-pay-method__title { margin: 0 0 10px; font-size: 14px; color: #2a4a6a; }
.awby-pay-method__opt { display: inline-flex; align-items: center; gap: 6px; margin-right: 24px; cursor: pointer; font-size: 14px; }
.awby-pay-method__opt small { display: block; color: #888; font-size: 11px; }
.awby-pay-method__radio { margin-right: 4px; }

.awby-pay-hint { font-size: 13px; padding: 8px 12px; border-radius: 6px; margin: 4px 0 0; }
.awby-pay-hint.is-ok { background: #e8f5e9; color: #2e7d32; }
.awby-pay-hint.is-warn { background: #fff3e0; color: #e65100; }
.awby-pay-hint a { color: #e07d00; font-weight: 600; }


/* --- Комплектация / доп опции в форме подачи --- */
.awby-options-field { margin-top: 8px; }
.awby-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
}
.awby-options-cat {
    background: #f9fafc;
    border: 1px solid #e8ecf2;
    border-radius: 8px;
    padding: 12px 14px;
}
.awby-options-cat__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #719DE4;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.awby-options-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    color: #4a5568;
    cursor: pointer;
    transition: color .15s;
}
.awby-options-chip:hover { color: #2a4a6a; }
.awby-options-chip input[type="checkbox"] {
    margin: 0;
    accent-color: #719DE4;
    cursor: pointer;
}
.awby-options-chip input:checked + span { color: #2a4a6a; font-weight: 600; }
@media (max-width: 560px) {
    .awby-options-grid { grid-template-columns: 1fr; }
}

/* ===== Подробные характеристики (сворачиваемая секция) ===== */
.awby-detailed-toggle {
    margin: 18px 0 8px;
}
.awby-detailed-toggle__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #f0f4fa;
    border: 1px solid #d4deec;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #2a4a6a;
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}
.awby-detailed-toggle__btn:hover { background: #e6edf6; }
.awby-detailed-toggle__btn.is-open { background: #e6edf6; }
.awby-detailed-toggle__icon {
    display: inline-block;
    width: 18px;
    text-align: center;
    color: #719DE4;
    font-size: 16px;
}
.awby-detailed-toggle__hint {
    margin-left: auto;
    font-size: 12px;
    font-weight: 400;
    color: #8a94a3;
}
.awby-detailed-block {
    background: #fafbfc;
    border: 1px solid #e4e8ef;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.awby-subgroup-title {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #719DE4;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eef1f5;
}
.awby-subgroup-title:first-child { margin-top: 0; }
@media (max-width: 560px) {
    .awby-detailed-toggle__hint { display: none; }
    .awby-detailed-block { padding: 12px; }
}
