/* Digitale Trauertafel - Basisstyles */
.dt-hero {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

.dt-top-nav,
.dt-bottom-nav {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.dt-bottom-nav {
    margin-top: 2rem;
    margin-bottom: 0;
}

.dt-back-link {
    font-size: 0.9rem;
    color: #bfa084;
    text-decoration: none;
    font-weight: 600;
}

.dt-back-link:hover {
    text-decoration: underline;
}

.dt-portrait {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.dt-name {
    margin: 0;
    font-size: 2rem;
}

.dt-dates {
    color: #555;
    display: flex;
    gap: .75rem;
    margin-top: .25rem;
}

.dt-epitaph {
    margin: 1rem 0;
    font-style: italic;
}

.dt-appointments ul {
    margin: 0;
    padding-left: 0;
    list-style: none !important;
}

.dt-anzeige-container {
    margin: 2rem auto;
    width: 100%;
    max-width: 1000px;
    background: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.dt-anzeige-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Aspect Ratios */
.dt-format-85-50 {
    aspect-ratio: 85 / 50;
}

.dt-format-85-80 {
    aspect-ratio: 85 / 80;
}

.dt-format-85-120 {
    aspect-ratio: 85 / 120;
}

.dt-format-128-60 {
    aspect-ratio: 128 / 60;
}

.dt-format-128-120 {
    aspect-ratio: 128 / 120;
}

.dt-anzeige-container[class*="dt-format-"]:not(.dt-format-native) img {
    height: 100%;
    object-fit: cover;
}

.dt-candle-modal-form .dt-btn,
.dt-candles .dt-btn {
    margin-top: 1.5rem;
}

.dt-candle-form .dt-form-row {
    margin-bottom: .5rem;
}

.dt-candle-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.dt-candle-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #eee;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 0 0 calc(25% - 0.75rem);
    background: #fafafa;
}

.dt-candle-choice input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.dt-candle-choice:hover {
    border-color: #ddd;
    background: #f5f5f5;
}

.dt-candle-choice:has(input:checked) {
    border-color: #bfa084;
    background: #fff9f4;
    box-shadow: 0 4px 12px rgba(191, 160, 132, 0.15);
}

.dt-candle-choice img,
.dt-candle-choice lottie-player {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.dt-btn {
    background: #333;
    color: #fff;
    padding: .5rem .9rem;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.dt-msg {
    margin-top: .5rem;
}

.dt-candle-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: .75rem;
    margin-top: .75rem;
}

.dt-candle {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: .5rem;
    background: #fff;
}

.dt-candle img,
.dt-candle lottie-player {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.dt-candle-meta {
    font-size: .85rem;
    color: #666;
    margin: .25rem 0;
}

.dt-condolences-list {
    display: grid;
    gap: .75rem;
}

.dt-condolence {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: .75rem;
    background: #fff;
}

.dt-condolence-head {
    font-weight: 600;
    margin-bottom: .25rem;
}

.dt-archive .dt-search {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
}

.dt-archive {
    margin: 140px auto;
}

.dt-archive .dt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.dt-card {
    display: block;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.dt-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.dt-card-body {
    padding: .75rem;
}

.dt-card-title {
    margin: 0 0 .25rem 0;
    font-size: 1.05rem;
}

.dt-card-dates {
    color: #666;
    font-size: .9rem;
}


.dt-pagination {
    display: flex;
    gap: 6px;
    margin: 25px 0;
    justify-content: center;
    align-items: center;
    font-size: 15px;
}

.dt-pagination a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    text-decoration: none !important;
    color: #444;
    transition: all 0.2s ease;
    background: white;
}

.dt-pagination a:hover {
    background: #e9e9e9;
    border-color: #bbb;
}

.dt-pagination a.active {
    background: #555;
    color: white;
    border-color: #444;
    font-weight: bold;
    pointer-events: none;
    cursor: default;
}

.dt-pagination a[rel="prev"],
.dt-pagination a[rel="next"] {
    font-weight: bold;
    padding: 6px 14px;
}


.dt-head {
    display: flex;
    gap: 25px;
}

.dt-date {
    color: #BFA084;
}

.dt-single {
    padding-bottom: 120px;
    padding-top: 60px;
}

.dt-single h1 {
    margin-top: 0;
    font-size: 2rem !important;
}

.dt-single h2 {
    margin-top: 0;
    font-size: 1.6rem !important;
}

.border-top {
    border-top: 1px solid #eee;
    padding-top: 2rem;
    margin-top: 2rem;
}


/* Modal Styles */
.dt-candle-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dt-candle-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.dt-candle-modal-box {
    position: relative;
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    max-width: 420px;
    width: 90%;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dt-close-candle-modal {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #bfa084 !important;
    font-size: 2rem !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease;
    z-index: 20;
    line-height: 1 !important;
    padding: 0 !important;
    opacity: 0.7;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.dt-close-candle-modal:hover {
    opacity: 1;
}

body.dt-modal-open {
    overflow: hidden;
}



/* Kerzen-Karten Text-Vorschau (3 Zeilen + Ellipsis) */
.dt-candle-text {
    position: relative;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* genau 3 Zeilen */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.45em * 3);
    /* fallback für ältere Browser */
    margin-bottom: 0.5rem;
}

.dt-candle-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.2em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 90%);
    pointer-events: none;
}



/* Kerze lesen Modal */
.dt-candle-read-modal,
.dt-candle-modal-form,
.dt-condolence-read-modal,
.dt-condolence-modal-form {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dt-candle-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.dt-candle-modal-box {
    position: relative;
    z-index: 10;
    background: #fff;
    padding: 3rem 2rem 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

/* Close button already styled above */



/* Kondolenz-Karten Layout */
.dt-condolence-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.dt-condolence {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.dt-condolence:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.dt-condolence-head {
    font-weight: 600;
    color: #333;
    margin-bottom: .3rem;
}

.dt-condolence-text {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.45em * 3);
    position: relative;
}

.dt-condolence-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.2em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 90%);
    pointer-events: none;
}

.dt-condolence-readmore,
.dt-candle-readmore {
    align-self: flex-start;
    margin-top: .5rem;
    background: none;
    border: 0;
    color: #b36b2f;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.dt-condolence-readmore:hover,
.dt-candle-readmore:hover {
    color: #8c5326;
    text-decoration: underline;
}

.dt-condolence-modal-form {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* --- LIVE SEARCH STYLES --- */
.dt-search-container {
    margin-bottom: 2rem;
    max-width: 800px;
}

.dt-search-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #444;
}

.dt-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 500px;
    width: 100%;
}

#dt-search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#dt-search-input:focus {
    border-color: #bfa084;
}

.dt-search-submit {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    color: #333 !important;
    cursor: pointer;
    padding: 0.25rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dt-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.dt-suggestions a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.dt-suggestions a:last-child {
    border-bottom: none;
}

.dt-suggestions a:hover,
.dt-suggestions a.active {
    background: #f8f8f8;
}

.dt-suggestion-date {
    font-size: 0.85rem;
    color: #777;
}

/* Glassmorphism effect for suggestions if preferred */
.dt-suggestions {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
}

@media (max-width: 767px) {

    .dt-top-nav,
    .dt-bottom-nav,
    .dt-hero {
        justify-content: center;
    }

    .dt-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        width: 100%;
    }

    .dt-single h1 {
        font-size: 1.75rem !important;
    }

    .dt-dates {
        justify-content: center;
    }
}