/* ================================================
   TDIH - This Day in True Crime History
   Edit this file to change the display format
   ================================================ */

/* --- Container --- */
#tdih-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: inherit;
}

/* --- Date heading --- */
.tdih-date-heading {
    font-size: 1.1em;
    font-weight: 600;
    color: #FFF;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
}

/* --- Admin bar --- */
#tdih-admin-bar {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 10px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85em;
    color: #FFF;
    flex-wrap: wrap;
}
.tdih-admin-label {
    font-weight: 600;
    color: #c0392b;
}
#tdih-admin-bar label {
    color: #aaa;
}
#tdih-date-picker {
    background: #111;
    border: 1px solid #444;
    color: #eee;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.9em;
}
#tdih-load-date {
    background: #c0392b;
    color: #fff;
    border: none;
    padding: 5px 14px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
}
#tdih-load-date:hover {
    background: #a93226;
}
#tdih-admin-status {
    color: #666;
    font-style: italic;
}

/* --- Event card --- */
.tdih-card {
    display: flex;
    flex-direction: row;
    gap: 24px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #222;
    align-items: flex-start;
}
.tdih-card:last-child {
    border-bottom: none;
}

/* --- Card image --- */
.tdih-card-image {
    flex: 0 0 280px;
    max-width: 280px;
}
.tdih-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}
.tdih-card-image-placeholder {
    width: 100%;
    height: 200px;
    background: #1a1a1a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 0.8em;
}
.tdih-image-credit {
    display: block;
    color: #555;
    font-size: 0.7em;
    margin-top: 4px;
}

/* --- Card content --- */
.tdih-card-content {
    flex: 1;
    min-width: 0;
}
.tdih-year {
    font-size: 0.85em;
    font-weight: 700;
    color: #c0392b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.tdih-title {
    font-size: 1.25em;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #f0f0f0;
}
.tdih-summary {
    font-size: 0.95em;
    line-height: 1.7;
    color: #FFF;
    margin-bottom: 14px;
}
.tdih-summary p {
    margin: 0 0 10px 0;
}
.tdih-summary a {
    color: #c0392b;
    text-decoration: none;
}
.tdih-summary a:hover {
    text-decoration: underline;
}

/* --- Tags --- */
.tdih-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.tdih-tag {
    font-size: 0.7em;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.tdih-tag-category {
    background: #1e1e1e;
    color: #c0392b;
    border: 1px solid #c0392b;
}
.tdih-tag-region {
    background: #1e1e1e;
    color: #888;
    border: 1px solid #444;
}

/* --- States --- */
.tdih-no-events {
    padding: 40px 0;
    color: #888;
    font-style: italic;
    text-align: center;
}
.tdih-loading {
    padding: 40px 0;
    color: #888;
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .tdih-card {
        flex-direction: column;
    }
    .tdih-card-image {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
    .tdih-card-image img {
        height: 220px;
    }
}
@media (min-width: 641px) and (max-width: 900px) {
    .tdih-card-image {
        flex: 0 0 220px;
        max-width: 220px;
    }
}

/* --- Ticker Bar --- */
.tdih-ticker-bar {
    background: #111;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
    padding: 0 16px;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    pointer-events: auto;
    cursor: default;
}
.tdih-ticker-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}
.tdih-ticker-items {
    position: relative;
    flex: 1;
    height: 52px;
    overflow: hidden;
}
.tdih-ticker-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.8s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}
.tdih-ticker-item.tdih-ticker-active {
    opacity: 1;
}
.tdih-ticker-year {
    font-size: 0.8em;
    font-weight: 700;
    color: #c0392b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    flex-shrink: 0;
}
.tdih-ticker-sep {
    color: #444;
    flex-shrink: 0;
}
.tdih-ticker-title {
    font-size: 0.9em;
    color: #ccc;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tdih-ticker-link {
    font-size: 0.8em;
    color: #c0392b;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.tdih-ticker-link:hover {
    text-decoration: underline;
}
.tdih-ticker-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}
.tdih-ticker-link:hover .tdih-ticker-arrow {
    transform: translateX(3px);
}
@media (max-width: 640px) {
    .tdih-ticker-link span.tdih-ticker-arrow {
        display: none;
    }
    .tdih-ticker-link {
        font-size: 0.75em;
    }
}

.tdih-ticker-thumb {
    height: 44px;
    width: auto;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
    margin-right: 4px;
}