/*
 * components.css
 * Enthält: wiederverwendbare UI-Bausteine (Buttons, Controls, Overlay, Modal).
 */

.cta-button {
    background-color: #799e86;
    color: white;
    display: inline-block;
    margin-top: 12px;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Playfair Display', serif;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: #718076;
    transform: translateY(-2px);
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background-color: #799e86;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #718076;
}

.back-to-top:focus-visible {
    outline: 2px solid #2c3539;
    outline-offset: 2px;
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.floating-controls {
    position: fixed;
    top: 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.floating-controls--left {
    left: 24px;
}

.floating-controls--right {
    right: 24px;
}

.music-toggle {
    --music-icon-circle-size: 32px;
    --music-hover-circle-size: 42px;
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background-color: #799e86;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.25s ease, background-color 0.3s ease, opacity 0.25s ease;
    flex-shrink: 0;
}

.quote-toggle {
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background-color: #799e86;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, background-color 0.3s ease;
    flex-shrink: 0;
}

.music-toggle.is-expanded {
    width: auto;
    border-radius: 999px;
    justify-content: flex-start;
    gap: 0;
    padding: 0 8px 0 12px;
}

.music-toggle.is-expanded .music-track-badge {
    margin-right: 13px;
}

.music-toggle.is-expanded .music-main-icon {
    margin-right: 10px;
}

.music-track-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    color: #4b5a54;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.18rem;
    font-weight: bold;
    font-family: 'Source Serif 4', serif;
    flex-shrink: 0;
}

.music-track-number {
    position: relative;
    top: -1px;
    line-height: 1;
}

.music-main-icon {
    width: var(--music-icon-circle-size);
    height: var(--music-icon-circle-size);
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 999px;
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.music-next-icon {
    width: var(--music-icon-circle-size);
    height: var(--music-icon-circle-size);
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1;
    transition: color 0.2s ease;
}

.music-main-icon::before,
.music-next-icon::before {
    content: "";
    position: absolute;
    width: var(--music-hover-circle-size);
    height: var(--music-hover-circle-size);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.music-toggle.is-expanded .music-next-icon {
    margin-left: 0;
    margin-right: 0;
}

.music-toggle.is-expanded .music-main-icon:hover,
.music-toggle.is-expanded .music-next-icon:hover {
    background: transparent;
}

.music-toggle.is-expanded .music-main-icon:hover::before,
.music-toggle.is-expanded .music-next-icon:hover::before {
    opacity: 1;
}

.music-toggle:hover,
.quote-toggle:hover {
    background-color: #718076;
    transform: translateY(-2px);
}

.music-toggle:focus-visible,
.quote-toggle:focus-visible {
    outline: 2px solid #2c3539;
    outline-offset: 2px;
}

.quote-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(38, 44, 40, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 1320;
}

.quote-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.quote-overlay__box {
    position: relative;
    width: min(920px, 100%);
    padding: 34px 84px;
    color: #f8f4ea;
}

.quote-overlay__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.quote-overlay__nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.quote-overlay__nav--prev {
    left: 0;
}

.quote-overlay__nav--next {
    right: 0;
}

.quote-overlay__text {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3.1rem);
    line-height: 1.35;
    font-style: italic;
    text-align: center;
    text-wrap: balance;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.36);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.quote-overlay__text.is-swapping {
    opacity: 0;
    transform: translateY(6px);
}

.quote-overlay__source {
    margin-top: 18px;
    text-align: center;
    font-family: 'Source Serif 4', serif;
    font-size: 1rem;
    font-style: normal;
    letter-spacing: 0.03em;
    color: rgba(248, 244, 234, 0.9);
}

.quote-overlay__meta {
    margin-top: 8px;
    text-align: center;
    font-family: 'Source Serif 4', serif;
    font-size: 0.88rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(248, 244, 234, 0.72);
}

.legal-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1400;
}

.legal-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.legal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 22, 0.52);
}

.legal-modal__dialog {
    position: relative;
    width: min(760px, calc(100% - 28px));
    max-height: 86vh;
    background: #fcfcfb;
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.legal-modal__close {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    color: #56615c;
    background: transparent;
    cursor: pointer;
}

.legal-modal__close:hover {
    background: rgba(121, 158, 134, 0.12);
}

.legal-modal__content {
    max-height: 86vh;
    overflow-y: auto;
    padding: 54px 26px 28px;
}

.legal-block + .legal-block {
    margin-top: 42px;
    padding-top: 28px;
    border-top: 1px solid rgba(121, 158, 134, 0.24);
}

.legal-block h2 {
    margin-bottom: 14px;
    font-size: 1.65rem;
    color: #2c3539;
}

.legal-block p {
    margin-bottom: 12px;
    line-height: 1.6;
}
