/* PARTEM-X BOS Storefront — Admin Workspace styling.
 * Renders INSIDE the Core dashboard's #ptx-content container — never
 * touches the Core's own sidebar/topbar styling.
 */

.ptxsf-workspace { --pw-brand: #7c3aed; --pw-accent: #22d3ee; font-family: inherit; font-size: 13.5px; }

/* Base button styles — shared by the Core-dashboard mini panel and the
   standalone Storefront Manager page. (storefront-public.css also
   defines .ptxsf-btn for the live customer-facing storefront, but that
   stylesheet is never loaded on these admin-side pages, so this add-on
   needs its own copy here rather than relying on it.) */
.ptxsf-btn { border: none; cursor: pointer; font-weight: 700; font-size: .84rem; padding: 10px 18px; border-radius: 12px; transition: transform .15s ease, box-shadow .15s ease; display: inline-block; text-decoration: none; line-height: 1.3; }
.ptxsf-btn:active { transform: scale(.97); }
.ptxsf-btn-primary { background: linear-gradient(135deg, #7c3aed, #22d3ee); color: #14102a; box-shadow: 0 8px 18px -8px rgba(124,58,237,.5); }
.ptxsf-btn-primary:hover { box-shadow: 0 10px 22px -8px rgba(124,58,237,.6); }
.ptxsf-btn-secondary { background: rgba(0,0,0,.06); color: inherit; }
.ptxsf-btn-ghost { background: transparent; color: #7c3aed; padding: 7px 10px; }
.ptxsf-btn-ghost:hover { background: rgba(124,58,237,.08); }
.ptxsf-btn[disabled] { opacity: .45; cursor: not-allowed; }
.ptxsf-btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.ptxsf-workspace-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ptxsf-workspace-title { font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.ptxsf-status-pill { padding: 3px 11px; border-radius: 999px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ptxsf-status-live { background: #14532d; color: #86efac; }
.ptxsf-status-draft { background: #3f3f10; color: #fde68a; }
.ptxsf-status-suspended, .ptxsf-status-restricted { background: #4c1d1d; color: #fca5a5; }

/* Horizontal, text-based submenu — required by spec (no icon-only menus). */
.ptxsf-hsubmenu {
	display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px;
	border-bottom: 1px solid rgba(0,0,0,.08);
}
.ptxsf-hsubmenu-item {
	background: none; border: none; cursor: pointer; padding: 9px 15px; font-size: .84rem; font-weight: 600;
	white-space: nowrap; color: inherit; opacity: .65; border-bottom: 3px solid transparent; transition: all .15s;
}
.ptxsf-hsubmenu-item:hover { opacity: 1; }
.ptxsf-hsubmenu-item.is-active { opacity: 1; border-bottom-color: var(--pw-brand); color: var(--pw-brand); }

.ptxsf-tab-content { min-height: 200px; }
.ptxsf-tab-content.is-loading { opacity: .5; pointer-events: none; }

.ptxsf-grid { display: grid; gap: 16px; margin-bottom: 20px; }
.ptxsf-grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.ptxsf-stat-card { background: linear-gradient(160deg, rgba(124,58,237,.08), rgba(34,211,238,.04)); border: 1px solid rgba(0,0,0,.06); border-radius: 16px; padding: 18px; box-shadow: 0 6px 18px -10px rgba(0,0,0,.25); }
.ptxsf-stat-label { font-size: .74rem; opacity: .65; margin-bottom: 6px; }
.ptxsf-stat-value { font-size: 1.35rem; font-weight: 800; }

.ptxsf-panel { background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 16px; padding: 22px; margin-bottom: 20px; box-shadow: 0 6px 18px -12px rgba(0,0,0,.15); }
.ptxsf-panel h3 { margin-top: 0; font-size: 1.02rem; }
.ptxsf-panel h4 { font-size: .9rem; }
.ptxsf-panel-header-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.ptxsf-subpanel { border-top: 1px dashed rgba(0,0,0,.1); margin-top: 16px; padding-top: 16px; }
.ptxsf-help { font-size: .8rem; opacity: .65; }
.ptxsf-badge { font-size: .7rem; background: rgba(124,58,237,.12); color: #7c3aed; padding: 4px 10px; border-radius: 999px; font-weight: 600; }

.ptxsf-checklist { list-style: none; padding: 0; margin: 0; }
.ptxsf-checklist li { padding: 8px 0 8px 28px; position: relative; opacity: .55; }
.ptxsf-checklist li::before { content: '○'; position: absolute; left: 0; }
.ptxsf-checklist li.is-done { opacity: 1; }
.ptxsf-checklist li.is-done::before { content: '●'; color: #16a34a; }

.ptxsf-url-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ptxsf-url-row code { background: rgba(0,0,0,.05); padding: 7px 13px; border-radius: 10px; font-size: .82rem; word-break: break-all; }

.ptxsf-mini-panel-card { text-align: left; }
.ptxsf-mini-panel .ptxsf-workspace-header { margin-bottom: 12px; }

.ptxsf-template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 16px 0; }
.ptxsf-template-card { border: 2px solid rgba(0,0,0,.08); border-radius: 16px; padding: 18px; transition: all .2s; }
.ptxsf-template-card.is-selected { border-color: #7c3aed; box-shadow: 0 8px 20px -10px rgba(124,58,237,.4); }
.ptxsf-template-card.is-locked { opacity: .55; }
.ptxsf-template-preview { display: block; width: 100%; height: auto; border-radius: 10px; margin-bottom: 12px; border: 1px solid rgba(0,0,0,.06); box-shadow: 0 6px 16px -10px rgba(0,0,0,.25); background: #fff; }
.ptxsf-locked-badge { font-size: .76rem; color: #b45309; }

.ptxsf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ptxsf-form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; }
.ptxsf-form-grid input, .ptxsf-form-grid select, .ptxsf-form-grid textarea { padding: 9px 12px; border: 1px solid rgba(0,0,0,.12); border-radius: 8px; font-weight: 400; font-size: .85rem; }
.ptxsf-span-2 { grid-column: span 2; }
fieldset.ptxsf-span-2 { border: 1px solid rgba(0,0,0,.08); border-radius: 10px; padding: 12px; }
.ptxsf-checkbox { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin-right: 14px; font-size: .82rem; }

.ptxsf-table { width: 100%; border-collapse: collapse; margin: 12px 0 24px; }
.ptxsf-table th, .ptxsf-table td { text-align: left; padding: 9px 11px; border-bottom: 1px solid rgba(0,0,0,.06); font-size: .8rem; }
.ptxsf-pill { padding: 3px 9px; border-radius: 999px; font-size: .66rem; font-weight: 700; }
.ptxsf-pill-active { background: #dcfce7; color: #166534; }
.ptxsf-pill-inactive { background: #fee2e2; color: #991b1b; }
.ptxsf-inline-select { padding: 5px 7px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); font-size: .76rem; }

.ptxsf-preview-panel .ptxsf-preview-frame { width: 100%; height: 640px; border: 1px solid rgba(0,0,0,.1); border-radius: 16px; }

.ptxsf-empty-state { text-align: center; padding: 60px 20px; opacity: .7; }
.ptxsf-empty-row { text-align: center; opacity: .5; }

.ptxsf-create-cta { max-width: 760px; margin: 20px auto; text-align: center; background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 20px; padding: 40px; box-shadow: 0 10px 30px -16px rgba(0,0,0,.2); }
.ptxsf-create-cta h2 { margin-top: 0; font-size: 1.25rem; }
.ptxsf-create-cta .ptxsf-template-grid { text-align: left; }
.ptxsf-create-cta .ptxsf-template-card { cursor: pointer; display: block; }
.ptxsf-create-cta .ptxsf-template-card input[type="radio"] { cursor: pointer; }
.ptxsf-template-card h4 { font-size: .92rem; margin: 4px 0; }

@media (max-width: 782px) {
	.ptxsf-form-grid { grid-template-columns: 1fr; }
	.ptxsf-span-2 { grid-column: span 1; }
}
