/* ============================================================
   Виджет «Кнопка» — shop-catalog
============================================================ */

.smp-wrap { display: flex; }

.smp-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-style: solid;
    border-width: 2px;
    border-color: #1B7A73;
    border-radius: 3px;
    background: transparent;
    color: #1B7A73;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
    line-height: 1.2;
    transition: filter .2s;
}
.smp-trigger:hover  { filter: brightness(1.15); text-decoration: none; }
.smp-trigger:active { filter: brightness(0.9); }

/* ── Оверлей ── */
.smp-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Блок попапа */
.smp-box {
    width: 100%;
    position: relative;
    box-sizing: border-box;
    margin: auto;
    border-radius: 8px;
    background: #fff;
}

/* Крестик */
.smp-close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 18px !important;
    line-height: 28px !important;
    text-align: center !important;
    cursor: pointer !important;
    background: #f3f4f6 !important;
    border: none !important;
    border-radius: 50% !important;
    color: #6b7280 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background .2s, color .2s;
    box-shadow: none !important;
    outline: none !important;
}
.smp-close:hover { background: #e5e7eb !important; color: #111 !important; }

/* Заголовок */
.smp-title {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    padding-right: 36px;
    line-height: 1.3;
    display: block;
}

/* ── Форма ── */
.smp-fields-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.smp-field      { box-sizing: border-box; }
.smp-field-w100 { width: 100%; }
.smp-field-w50  { width: calc(50% - 6px); }

.smp-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    font-family: -apple-system, Arial, sans-serif;
}
.smp-req { color: #ef4444; margin-left: 2px; }

/* Сброс стилей темы только для полей внутри попапа */
.smp-overlay .smp-field-input,
.smp-overlay .smp-field-select {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: #fff !important;
    background-image: none !important;
    border: 1px solid #d1d5db !important;
    border-radius: 5px !important;
    box-shadow: none !important;
    color: #1a1a1a !important;
    display: block !important;
    font-family: -apple-system, Arial, sans-serif !important;
    font-size: 14px !important;
    height: auto !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    outline: none !important;
    padding: 10px 13px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: border-color .2s, box-shadow .2s;
}
.smp-overlay .smp-field-input:focus,
.smp-overlay .smp-field-select:focus {
    border-color: #1B7A73 !important;
    box-shadow: 0 0 0 3px rgba(27,122,115,.12) !important;
    outline: none !important;
}
.smp-overlay textarea.smp-field-input {
    resize: vertical !important;
    min-height: 100px !important;
    height: auto !important;
}

.smp-form-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Кнопка отправки */
.smp-overlay .smp-submit {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: block !important;
    width: 100% !important;
    background: #1B7A73 !important;
    background-image: none !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    font-family: -apple-system, Arial, sans-serif !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    transition: filter .2s;
    text-align: center !important;
}
.smp-overlay .smp-submit:hover    { filter: brightness(1.1); }
.smp-overlay .smp-submit:disabled { filter: brightness(0.7) !important; cursor: default !important; }

/* Сообщение */
.smp-form-msg { font-size: 14px; line-height: 1.5; display: block; }
.smp-form-msg.smp-success { color: #1B7A73; font-weight: 600; }
.smp-form-msg.smp-error   { color: #ef4444; }

/* ── Адаптив ── */
@media (max-width: 600px) {
    .smp-overlay   { padding: 10px; }
    .smp-title     { font-size: 18px; }
    .smp-field-w50 { width: 100%; }
}
