/*
 * Geburtstagsbox – Frontend
 *
 * Grundgerüst und Maße. Schrift, Größe und Farbe der einzelnen Texte kommen
 * aus den Einstellungen; was dort leer bleibt, erbt das Aussehen vom Theme.
 */

.gb {
    --gb-line: rgba(128, 128, 128, .25);
    --gb-soft: rgba(128, 128, 128, .10);
    --gb-accent: var(--rs-accent, var(--accent, #2563eb));

    color: inherit;
    font-size: 14px;
    line-height: 1.55;
}

.gb * { box-sizing: border-box; }

.gb-main { font-size: 15px; margin: 0 0 18px; }

/* ------------------------------------------------------------- Texte */

.gb-head {
    margin: 12px 0 7px;
    line-height: 1.35;
}

.gb-head:first-child { margin-top: 0; }
.gb-head > :first-child { margin-top: 0; }
.gb-head > :last-child { margin-bottom: 0; }

.gb-none {
    margin: 0;
    line-height: 1.45;
}

/* ------------------------------------------------------------ Listen */

.gb-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gb-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 0;
}

.gb-item + .gb-item { border-top: 1px solid var(--gb-line); }

.gb-photo {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gb-soft);
}

.gb-photo-leer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .82em;
    opacity: .75;
}

.gb-body {
    flex: 1 1 auto;
    min-width: 0;
}

.gb-name {
    display: block;
    color: inherit;
    text-decoration: none;
    line-height: 1.3;
    overflow-wrap: break-word;
}

a.gb-name:hover { color: var(--gb-accent); text-decoration: underline; }

.gb-meta {
    display: block;
    font-size: .84em;
    opacity: .78;
    line-height: 1.35;
}

/* ---------------------------------------------------------- Formular */

.gb-formbox {
    border: 1px solid var(--gb-line);
    border-radius: 12px;
    background: rgba(128, 128, 128, .05);
    padding: 16px 18px;
    margin: 0 0 18px;
    font-size: 15px;
}

.gb-form-title {
    margin: 0 0 8px;
    font-size: 1.2em;
    font-weight: 700;
    color: inherit;
}

.gb-form-text { margin: 0 0 14px; }
.gb-form-text > :first-child { margin-top: 0; }
.gb-form-text > :last-child { margin-bottom: 0; }

.gb-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0 14px;
}

.gb-field { margin-bottom: 13px; }

.gb-field label {
    display: block;
    margin-bottom: 5px;
    font-size: .85em;
    font-weight: 600;
    opacity: .85;
}

.gb-field select,
.gb-field input[type="number"] {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--gb-line);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .94em;
    line-height: 1.3;
}

.gb-field select option { color: initial; }

.gb-field select:focus,
.gb-field input:focus { outline: 2px solid var(--gb-accent); outline-offset: -1px; }

.gb-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.gb-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border: 1px solid var(--gb-accent);
    border-radius: 8px;
    background: var(--gb-accent);
    color: #fff;
    font: inherit;
    font-size: .9em;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.gb-btn:hover { filter: brightness(1.08); }

.gb-btn-plain {
    background: transparent;
    border-color: var(--gb-line);
    color: inherit;
    font-weight: 500;
}

.gb-btn-plain:hover { border-color: #e03131; color: #e03131; filter: none; }

/* --------------------------------------------------------- Meldungen */

.gb-note {
    margin: 0 0 12px;
    padding: 10px 13px;
    border: 1px solid var(--gb-line);
    border-radius: 9px;
    font-size: .92em;
}

.gb-note-ok { border-color: rgba(47, 158, 68, .5); background: rgba(47, 158, 68, .10); }
.gb-note-error { border-color: rgba(224, 49, 49, .5); background: rgba(224, 49, 49, .10); }

/* -------------------------------------------------------- In der Box */

.nova-box .gb { margin: 0; }
