3cc002a6da
- Bead Markers section in library panel with Small, Large, Crucifix cards - Bead steps render as amber-tinted cards in the sequence (no attribution) - migrate_v5.php: adds step_type/bead_type columns, makes prayer_id nullable - Bead steps produce slides with proper bead+bead_index so the ring advances during presentation — allows participants to follow along on physical beads - Prayer steps between beads still show bead_index=null (ring stays on last bead) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
658 lines
14 KiB
CSS
658 lines
14 KiB
CSS
/* ================================================================
|
|
builder.css — Rosary Builder page styles
|
|
Inherits design tokens from setup.css (loaded first)
|
|
================================================================ */
|
|
|
|
/* ── Page layout ─────────────────────────────────────────────── */
|
|
|
|
#builder-page {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.builder-wrap {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-height: 0; /* lets children shrink below their content height */
|
|
overflow: hidden;
|
|
}
|
|
|
|
.builder-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 14px 24px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--bg-card);
|
|
flex-shrink: 0;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.builder-toolbar h2 {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.builder-toolbar .divider {
|
|
width: 1px;
|
|
height: 24px;
|
|
background: var(--border);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.builder-toolbar .session-name-input {
|
|
flex: 1;
|
|
min-width: 180px;
|
|
max-width: 340px;
|
|
padding: 7px 12px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-family: var(--font);
|
|
background: var(--bg);
|
|
}
|
|
|
|
.builder-toolbar .session-name-input:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
|
|
}
|
|
|
|
.toolbar-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-left: auto;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.toolbar-right .public-toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
font-size: 13px;
|
|
color: var(--muted);
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
/* ── Subject row (collapsible) ───────────────────────────────── */
|
|
|
|
.builder-subject {
|
|
background: var(--bg);
|
|
border-bottom: 1px solid var(--border);
|
|
padding: 0 24px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.builder-subject summary {
|
|
padding: 10px 0;
|
|
font-size: 13px;
|
|
color: var(--muted);
|
|
cursor: pointer;
|
|
list-style: none;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.builder-subject summary::before {
|
|
content: '▶';
|
|
font-size: 10px;
|
|
transition: transform 0.15s;
|
|
}
|
|
|
|
.builder-subject[open] summary::before {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.builder-subject-fields {
|
|
display: flex;
|
|
gap: 10px;
|
|
padding-bottom: 12px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.builder-subject-fields input,
|
|
.builder-subject-fields select {
|
|
padding: 7px 10px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
font-family: var(--font);
|
|
background: var(--bg-card);
|
|
}
|
|
|
|
.builder-subject-fields input:focus,
|
|
.builder-subject-fields select:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
}
|
|
|
|
/* ── Two-panel body ──────────────────────────────────────────── */
|
|
|
|
.builder-body {
|
|
display: grid;
|
|
grid-template-columns: 380px 1fr;
|
|
flex: 1;
|
|
min-height: 0; /* required — without this the grid doesn't shrink in a flex column */
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ── Sequence panel (left) ───────────────────────────────────── */
|
|
|
|
.builder-sequence {
|
|
border-right: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
overflow: hidden;
|
|
background: var(--bg);
|
|
}
|
|
|
|
.panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--bg-card);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.panel-header h3 {
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.step-count-badge {
|
|
font-size: 12px;
|
|
background: var(--border);
|
|
color: var(--muted);
|
|
padding: 2px 8px;
|
|
border-radius: 20px;
|
|
}
|
|
|
|
.step-count-badge.has-steps {
|
|
background: #dbeafe;
|
|
color: var(--primary);
|
|
}
|
|
|
|
#step-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 10px;
|
|
}
|
|
|
|
.step-empty {
|
|
text-align: center;
|
|
padding: 48px 20px;
|
|
color: var(--muted);
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.step-empty svg {
|
|
opacity: 0.3;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
/* ── Step card ───────────────────────────────────────────────── */
|
|
|
|
.step-card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
margin-bottom: 8px;
|
|
display: grid;
|
|
grid-template-columns: 28px 1fr auto;
|
|
gap: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.step-num {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
padding: 12px 0 0;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
color: var(--muted);
|
|
background: var(--bg);
|
|
border-right: 1px solid var(--border);
|
|
}
|
|
|
|
.step-body {
|
|
padding: 10px 12px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.step-name {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
margin-bottom: 4px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.step-preview {
|
|
font-size: 11px;
|
|
color: var(--muted);
|
|
line-height: 1.4;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.step-preview.leader { color: #2563eb; }
|
|
.step-preview.response { color: #059669; }
|
|
|
|
.step-attribution-select {
|
|
margin-top: 6px;
|
|
padding: 3px 6px;
|
|
font-size: 11px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: var(--font);
|
|
cursor: pointer;
|
|
width: 100%;
|
|
}
|
|
|
|
.step-actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 2px;
|
|
padding: 8px 6px;
|
|
border-left: 1px solid var(--border);
|
|
background: var(--bg);
|
|
}
|
|
|
|
.btn-icon {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 3px 5px;
|
|
border-radius: 4px;
|
|
color: var(--muted);
|
|
font-size: 13px;
|
|
line-height: 1;
|
|
transition: background 0.1s, color 0.1s;
|
|
}
|
|
|
|
.btn-icon:hover { background: var(--border); color: var(--text); }
|
|
.btn-icon.remove:hover { background: #fee2e2; color: var(--danger); }
|
|
.btn-icon:disabled { opacity: 0.3; cursor: default; }
|
|
.btn-icon:disabled:hover { background: none; color: var(--muted); }
|
|
|
|
/* ── Library panel (right) ───────────────────────────────────── */
|
|
|
|
.builder-library {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
overflow: hidden;
|
|
background: var(--bg);
|
|
}
|
|
|
|
.library-header {
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--bg-card);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.library-search {
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-family: var(--font);
|
|
margin-bottom: 10px;
|
|
background: var(--bg);
|
|
}
|
|
|
|
.library-search:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
|
|
}
|
|
|
|
.library-tabs {
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
.tab-btn {
|
|
padding: 5px 14px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 20px;
|
|
background: none;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
color: var(--muted);
|
|
font-family: var(--font);
|
|
transition: all 0.15s;
|
|
}
|
|
|
|
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
|
|
.tab-btn.active {
|
|
background: var(--primary);
|
|
border-color: var(--primary);
|
|
color: #fff;
|
|
font-weight: 500;
|
|
}
|
|
|
|
#prayer-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 12px 16px;
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
gap: 10px;
|
|
align-content: start;
|
|
}
|
|
|
|
.library-empty {
|
|
grid-column: 1 / -1;
|
|
text-align: center;
|
|
padding: 40px;
|
|
color: var(--muted);
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* ── Prayer card ─────────────────────────────────────────────── */
|
|
|
|
.prayer-card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
transition: border-color 0.15s, box-shadow 0.15s;
|
|
}
|
|
|
|
.prayer-card:hover {
|
|
border-color: #93c5fd;
|
|
box-shadow: 0 2px 8px rgba(37,99,235,0.08);
|
|
}
|
|
|
|
.prayer-card-top {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
|
|
.prayer-card-name {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.source-badge {
|
|
font-size: 10px;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
font-weight: 500;
|
|
flex-shrink: 0;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.source-badge.standard { background: #fef9c3; color: #854d0e; }
|
|
.source-badge.global { background: #dcfce7; color: #166534; }
|
|
.source-badge.mine { background: #ede9fe; color: #6d28d9; }
|
|
|
|
.prayer-card-preview {
|
|
font-size: 11px;
|
|
color: var(--muted);
|
|
line-height: 1.45;
|
|
overflow: hidden;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
|
|
.prayer-card-footer {
|
|
display: flex;
|
|
gap: 6px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* ── Bead markers section ────────────────────────────────────── */
|
|
|
|
.bead-markers-section {
|
|
padding: 10px 16px 8px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--bg-card);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.bead-markers-label {
|
|
font-size: 10px;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: .06em;
|
|
color: var(--muted);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.bead-marker-cards {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.bead-marker-card {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 10px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
background: var(--bg);
|
|
cursor: pointer;
|
|
font-family: var(--font);
|
|
font-size: 12px;
|
|
text-align: left;
|
|
transition: border-color .15s, background .15s;
|
|
}
|
|
|
|
.bead-marker-card:hover {
|
|
border-color: var(--primary);
|
|
background: #eff6ff;
|
|
}
|
|
|
|
.bead-icon-sm { font-size: 18px; color: #6b7280; flex-shrink: 0; line-height: 1; }
|
|
.bead-icon-lg { font-size: 20px; color: #374151; flex-shrink: 0; line-height: 1; }
|
|
.bead-icon-cx { font-size: 18px; color: var(--gold); flex-shrink: 0; line-height: 1; }
|
|
|
|
.bead-card-text {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.bead-card-text strong { font-size: 12px; font-weight: 600; color: var(--text); }
|
|
.bead-card-text small { font-size: 10px; color: var(--muted); }
|
|
|
|
.bead-add-label {
|
|
font-size: 11px;
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* ── Bead step card (in sequence list) ───────────────────────── */
|
|
|
|
.step-card.bead-step {
|
|
background: #fefce8;
|
|
border-color: #fde68a;
|
|
}
|
|
|
|
.step-card.bead-step:hover {
|
|
border-color: #f59e0b;
|
|
}
|
|
|
|
.bead-step-name {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #92400e;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.bead-step-sub {
|
|
font-size: 11px;
|
|
color: #b45309;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* ── Library footer ──────────────────────────────────────────── */
|
|
|
|
.library-footer {
|
|
padding: 12px 16px;
|
|
border-top: 1px solid var(--border);
|
|
background: var(--bg-card);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* ── Message bar (save feedback) ─────────────────────────────── */
|
|
|
|
#builder-msg {
|
|
padding: 0 24px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#builder-msg .alert {
|
|
margin: 10px 0 0;
|
|
}
|
|
|
|
/* ── Modal ───────────────────────────────────────────────────── */
|
|
|
|
.modal-overlay {
|
|
display: none; /* hidden by default; JS adds .modal-open to show */
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.45);
|
|
z-index: 1000;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.modal-overlay.modal-open {
|
|
display: flex;
|
|
}
|
|
|
|
.modal-box {
|
|
background: var(--bg-card);
|
|
border-radius: 12px;
|
|
padding: 28px;
|
|
width: 100%;
|
|
max-width: 540px;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.modal-box h3 {
|
|
font-size: 1.1rem;
|
|
margin: 0 0 20px;
|
|
}
|
|
|
|
.attr-radios {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 8px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.attr-radio-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
transition: all 0.15s;
|
|
}
|
|
|
|
.attr-radio-label:hover { border-color: var(--primary); }
|
|
.attr-radio-label input[type=radio] { accent-color: var(--primary); }
|
|
.attr-radio-label.checked { border-color: var(--primary); background: #eff6ff; }
|
|
|
|
.modal-textarea {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
font-family: var(--font);
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
resize: vertical;
|
|
background: var(--bg);
|
|
}
|
|
|
|
.modal-textarea:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
|
|
}
|
|
|
|
.help-hint {
|
|
font-size: 11px;
|
|
color: var(--muted);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.modal-footer {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 20px;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
/* ── Responsive ──────────────────────────────────────────────── */
|
|
|
|
@media (max-width: 768px) {
|
|
.builder-body {
|
|
grid-template-columns: 1fr;
|
|
grid-template-rows: auto 1fr;
|
|
}
|
|
|
|
.builder-sequence {
|
|
border-right: none;
|
|
border-bottom: 1px solid var(--border);
|
|
max-height: 45vh;
|
|
}
|
|
|
|
#prayer-list {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|