/* Silver Memories Brand CSS — derived from Brand Styleguide v1.1 */

:root {
    --sm-teal:       #3A7684;
    --sm-aqua:       #87D0D0;
    --sm-aqua-tint:  #ABDEDE;
    --sm-sand:       #D4C9BF;
    --sm-sand-light: #ede8e3;
    --sm-coral:      #D46C56;
    --sm-orange:     #EC8E3F;
    --sm-yellow:     #FFCC00;
    --sm-ink:        #1F1F1F;
    --sm-ink-soft:   #4a4a4a;
    --sm-paper:      #FFFFFF;
    --sm-bg:         #f8f6f4;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;

    --radius-pill: 999px;
    --radius-card: 12px;
    --shadow-card: 0 2px 12px rgba(60, 117, 132, 0.10);
    --shadow-card-hover: 0 6px 24px rgba(60, 117, 132, 0.18);
}

/* ── Typography ───────────────────────────────────────────── */
/* body and h1-h6 rules live in site.css scoped to .sm-public-site
   so they cannot bleed into the admin section. */

.heading-italic {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
}

.heading-semibold {
    font-family: var(--font-display);
    font-weight: 600;
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn-sm-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sm-paper);
    background-color: var(--sm-teal);
    border: 2px solid var(--sm-teal);
    border-radius: var(--radius-pill);
    padding: 0.65rem 1.75rem;
    min-height: 44px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
    line-height: 1;
}

.btn-sm-primary:hover,
.btn-sm-primary:focus-visible {
    background-color: var(--sm-teal);
    border-color: var(--sm-teal);
    color: var(--sm-paper);
    box-shadow: 0 0 0 3px rgba(60, 117, 132, 0.3);
    text-decoration: none;
}

.btn-sm-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sm-teal);
    background-color: transparent;
    border: 2px solid var(--sm-teal);
    border-radius: var(--radius-pill);
    padding: 0.65rem 1.75rem;
    min-height: 44px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
    line-height: 1;
}

.btn-sm-outline:hover,
.btn-sm-outline:focus-visible {
    background-color: var(--sm-teal);
    color: var(--sm-paper);
    box-shadow: 0 0 0 3px rgba(60, 117, 132, 0.3);
    text-decoration: none;
}

.btn-sm-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sm-paper);
    background-color: var(--sm-coral);
    border: 2px solid var(--sm-coral);
    border-radius: var(--radius-pill);
    padding: 0.65rem 1.75rem;
    min-height: 44px;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.2s, box-shadow 0.2s;
    line-height: 1;
}

.btn-sm-danger:hover,
.btn-sm-danger:focus-visible {
    filter: brightness(0.9);
    color: var(--sm-paper);
    box-shadow: 0 0 0 3px rgba(212, 108, 86, 0.3);
}

/* Modal close button */
.btn-sm-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    color: #b0b0b0;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
    text-decoration: none;
}

.btn-sm-close:hover {
    color: #555;
    background-color: rgba(0,0,0,0.07);
}

/* Ghost / text link */
.btn-sm-ghost {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--sm-teal);
    background: none;
    border: none;
    padding: 0.25rem 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-sm-ghost:hover { color: var(--sm-teal); }

/* ── Focus rings ──────────────────────────────────────────── */

:focus-visible {
    outline: 3px solid var(--sm-aqua);
    outline-offset: 2px;
}

/* ── Type badges ──────────────────────────────────────────── */

.type-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sm-teal);
    background-color: var(--sm-aqua-tint);
    border-radius: var(--radius-pill);
    padding: 0.2rem 0.75rem;
    margin: 0.125rem;
    white-space: nowrap;
}

/* ── Cards ────────────────────────────────────────────────── */

.sm-card {
    background: var(--sm-paper);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.sm-card:hover {
    box-shadow: var(--shadow-card-hover);
}

/* ── Act type segmented toggle ────────────────────────────── */

.sm-act-type-toggle {
    display: inline-flex;
    border: 1.5px solid var(--sm-teal);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.sm-act-type-btn {
    padding: 0.5rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--sm-teal);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    min-height: 44px;
    touch-action: manipulation;
    line-height: 1;
}

.sm-act-type-btn + .sm-act-type-btn {
    border-left: 1.5px solid var(--sm-teal);
}

.sm-act-type-btn.selected {
    background-color: var(--sm-teal);
    color: var(--sm-paper);
}

.sm-act-type-btn:not(.selected):hover {
    background-color: var(--sm-aqua-tint);
}

/* ── Entertainment type chips ─────────────────────────────── */

.sm-type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sm-type-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--sm-teal);
    background: transparent;
    color: var(--sm-teal);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    user-select: none;
    -webkit-user-select: none;
    min-height: 44px;
    touch-action: manipulation;
}

.sm-type-chip:hover {
    background-color: var(--sm-aqua-tint);
}

.sm-type-chip.selected {
    background-color: var(--sm-teal);
    color: var(--sm-paper);
}

.sm-type-chip.selected:hover {
    filter: brightness(0.92);
}

/* ── Forms ────────────────────────────────────────────────── */

.sm-form-label {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    color: var(--sm-ink);
    margin-bottom: 0.25rem;
    display: block;
}

.sm-form-input,
.sm-form-select,
.sm-form-textarea {
    font-family: var(--font-body);
    width: 100%;
    border: 1.5px solid var(--sm-sand);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    color: var(--sm-ink);
    background-color: var(--sm-paper);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sm-form-input:focus,
.sm-form-select:focus,
.sm-form-textarea:focus {
    border-color: var(--sm-teal);
    box-shadow: 0 0 0 3px rgba(60, 117, 132, 0.15);
    outline: none;
}

.form-check-input:checked {
    background-color: var(--sm-teal);
    border-color: var(--sm-teal);
}

.sm-form-input.invalid,
.sm-form-select.invalid,
.sm-form-textarea.invalid {
    border-color: var(--sm-coral);
}

.sm-validation-msg {
    font-size: 0.825rem;
    color: var(--sm-coral);
    margin-top: 0.2rem;
}

.sm-fieldset {
    border: none;
    padding: 0;
}

.sm-fieldset-legend {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sm-ink);
    margin-bottom: 0;
    padding: 0;
}

.sm-fieldset-helper {
    font-size: 0.8rem;
    color: var(--sm-ink-soft);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.sm-fieldset-inline .form-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1.5rem;
    margin-bottom: 0;
}

/* Image upload */
.image-drop-zone {
    border: 2px dashed var(--sm-teal);
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    background-color: var(--sm-bg);
    transition: background-color 0.2s;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.image-drop-zone:hover {
    background-color: var(--sm-aqua-tint);
}

.image-drop-zone.drag-over {
    background-color: var(--sm-aqua-tint);
    border-color: var(--sm-teal);
}

.image-drop-zone p {
    margin: 0;
    color: var(--sm-ink-soft);
    font-size: 1rem;
}

.image-drop-zone .icon {
    color: var(--sm-teal);
    margin-bottom: 0.75rem;
    line-height: 0;
}

.hidden-file-input {
    display: none;
}

.image-thumbnail-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--sm-sand);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.image-thumbnail:hover {
    border-color: var(--sm-teal);
}

.image-thumbnail.primary {
    border-color: var(--sm-teal);
    box-shadow: 0 0 0 2px var(--sm-teal);
}

.image-thumbnail img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.image-thumbnail-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background-color: var(--sm-teal);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    display: none;
}

.image-thumbnail.feature .image-thumbnail-badge {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-thumbnail-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--sm-coral);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-thumbnail:hover .image-thumbnail-remove {
    opacity: 1;
}

/* ── Toast / alert ────────────────────────────────────────── */

.sm-alert {
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    margin-bottom: 1rem;
}

.sm-alert-success {
    background-color: #e6f5f5;
    color: var(--sm-teal);
    border: 1px solid var(--sm-aqua);
}

.sm-alert-error {
    background-color: #fdf0ed;
    color: #9e3a26;
    border: 1px solid var(--sm-coral);
}

.sm-alert-info {
    background-color: var(--sm-aqua-tint);
    color: var(--sm-teal);
    border: 1px solid var(--sm-aqua);
}
