/* =============================================================================
   SellSense Shops — управление магазинами на фронтенде
   ============================================================================= */

.sellsense-shops-wrap { position: relative; }

/* ── Тулбар ─────────────────────────────────────────────────────────────────── */
.sellsense-shops-toolbar {
    display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}

.sellsense-shops-notice {
    padding: 8px 14px; border-radius: 6px; font-size: 13px;
}

.sellsense-shops-empty {
    padding: 32px; text-align: center; color: #64748b;
    border: 1px dashed #cbd5e1; border-radius: 8px;
}

/* ── Таблица ────────────────────────────────────────────────────────────────── */
.sellsense-shops-table-wrap { overflow-x: auto; }

.sellsense-shops-table {
    width: 100%; border-collapse: collapse; font-size: 14px;
}
.sellsense-shops-table th, .sellsense-shops-table td {
    padding: 10px 12px; border-bottom: 1px solid #f1f5f9; text-align: left;
}
.sellsense-shops-table th {
    font-weight: 600; color: #475569; font-size: 12px;
    text-transform: uppercase; letter-spacing: .02em;
}

.col-actions { white-space: nowrap; }
.col-actions button {
    border: none; background: none; cursor: pointer; font-size: 15px;
    padding: 4px 8px; border-radius: 4px; color: #64748b;
}
.col-actions button:hover { background: #f1f5f9; color: #1e293b; }

.badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; background: #eef2ff; color: #4338ca;
}
.badge-ozon { background: #dcfce7; color: #166534; }
.badge-sber { background: #d1fae5; color: #065f46; }

/* ── <dialog> попапы ────────────────────────────────────────────────────────── */
dialog.ss-dialog {
    padding: 0; border: none; border-radius: 12px;
    box-shadow: 0 24px 64px rgba(15,23,42,.22);
    max-width: 480px; width: calc(100vw - 32px);
    max-height: 90vh; overflow: hidden;
    background: #fff;
}
dialog.ss-dialog::backdrop {
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}

@keyframes ss-dialog-in {
    from { opacity: 0; transform: translateY(-12px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
dialog.ss-dialog[open] { animation: ss-dialog-in .2s ease; }

.ss-dialog-inner { padding: 24px; max-height: 90vh; overflow-y: auto; position: relative; }

.ss-dialog-title {
    font-size: 16px; font-weight: 700; color: #1e293b;
    margin: 0 0 20px; padding-right: 28px;
}

.ss-dialog-close {
    position: absolute; top: 16px; right: 16px;
    border: none; background: none; font-size: 18px;
    color: #94a3b8; cursor: pointer; padding: 4px 8px;
    border-radius: 4px; line-height: 1;
}
.ss-dialog-close:hover { background: #f1f5f9; color: #334155; }

/* ── Форма ──────────────────────────────────────────────────────────────────── */
.ss-field { margin-bottom: 14px; }
.ss-field label {
    display: block; font-size: 12px; font-weight: 600;
    color: #475569; margin-bottom: 6px;
}

.ss-input {
    width: 100%; padding: 8px 12px;
    border: 1px solid #cbd5e1; border-radius: 6px;
    font-size: 14px; color: #1e293b;
    transition: border-color .15s;
    box-sizing: border-box;
}
.ss-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }

.ss-field-hint {
    margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: #64748b;
}

.ss-token-masked-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc;
}
.ss-token-masked-value { flex: 1; color: #475569; word-break: break-all; }

.ss-btn-replace-token {
    border: 1px solid #cbd5e1; background: #fff; color: #334155;
    padding: 5px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
    white-space: nowrap;
}
.ss-btn-replace-token:hover { border-color: #6366f1; color: #6366f1; }

.ss-form-actions {
    display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px;
    padding-top: 16px; border-top: 1px solid #f1f5f9;
}

.ss-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 500;
    cursor: pointer; border: 1px solid transparent; transition: all .15s;
    line-height: 1.4;
}
.ss-btn:disabled { opacity: .5; cursor: not-allowed; }
.ss-btn--primary { background: #cb11ab; color: #fff; border-color: #cb11ab; }
.ss-btn--primary:hover:not(:disabled) { background: #a50d8c; border-color: #a50d8c; }
.ss-btn--ghost { background: #fff; color: #475569; border-color: #cbd5e1; }
.ss-btn--ghost:hover:not(:disabled) { border-color: #94a3b8; background: #f8fafc; }
.ss-btn--danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.ss-btn--danger:hover:not(:disabled) { background: #b91c1c; border-color: #b91c1c; }

.ss-notice { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-top: 10px; }
.ss-notice--error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

.ss-delete-mode-option {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 0; font-size: 13px; color: #334155; cursor: pointer;
}

.ss-spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid #e2e8f0; border-top-color: #6366f1;
    border-radius: 50%; animation: ss-spin .7s linear infinite;
    vertical-align: middle; margin-right: 4px;
}
@keyframes ss-spin { to { transform: rotate(360deg); } }
