/* =============================================
   Transform Reads — Article of the Month Plugin
   Book-themed spotlight widget
   ============================================= */

/* ── Outer wrapper ── */
.tr-wotm-widget {
    font-family: Georgia, 'Times New Roman', serif;
    position: relative;
    display: flex;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    border-radius: 4px 14px 14px 4px;
    box-shadow:
        -6px 0 0 #5a3a1a,
        -10px 0 0 #7a5230,
        -14px 2px 0 #4a2e10,
        6px 10px 30px rgba(0, 0, 0, 0.28),
        2px 2px 0 rgba(255, 255, 255, 0.10) inset;
}

/* ── Spine ── */
.tr-wotm-spine {
    width: 38px;
    flex-shrink: 0;
    background: linear-gradient(to right,
        #4a2e10 0%, #7a5230 30%, #9a6a40 60%, #c8903a 80%, #b07830 100%
    );
    border-radius: 4px 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tr-wotm-spine::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 8px; width: 2px;
    background: rgba(255, 255, 255, 0.08);
}

.tr-wotm-spine-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 235, 180, 0.75);
    font-family: Georgia, serif;
    white-space: nowrap;
    user-select: none;
}

/* ── Page ── */
.tr-wotm-page {
    flex: 1;
    min-width: 0;
    background: linear-gradient(to bottom, #fdf8ee 0%, #f8f0dc 100%);
    border-radius: 0 14px 14px 0;
    padding: 28px 28px 22px 24px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 4px 0 8px rgba(100, 70, 30, 0.10);
}

/* Ruled lines */
.tr-wotm-page::after {
    content: '';
    position: absolute;
    top: 130px;
    left: 24px; right: 24px;
    bottom: 50px;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px, transparent 27px,
        rgba(160, 130, 80, 0.08) 27px, rgba(160, 130, 80, 0.08) 28px
    );
    pointer-events: none;
}

/* Top-corner fold */
.tr-wotm-page::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 22px 22px 0;
    border-color: transparent #e0d0b0 transparent transparent;
    filter: drop-shadow(-1px 1px 1px rgba(0,0,0,0.12));
}

/* ── Header ── */
.tr-wotm-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.tr-wotm-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tr-wotm-rule::before,
.tr-wotm-rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #a07840, transparent);
}

.tr-wotm-rule--bottom { margin-top: 8px; margin-bottom: 0; }

.tr-wotm-ornament {
    font-size: 13px;
    color: #a07840;
    line-height: 1;
    user-select: none;
}

.tr-wotm-eyebrow {
    font-size: 10px !important;
    letter-spacing: 2.5px !important;
    text-transform: uppercase !important;
    color: #9a7040 !important;
    margin: 0 0 4px !important;
    font-style: normal !important;
    font-family: Georgia, serif !important;
}

.tr-wotm-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    font-style: italic !important;
    color: #2a1a08 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.5px !important;
    font-family: Georgia, 'Times New Roman', serif !important;
    border: none !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ── Featured image ── */
.tr-wotm-thumbnail-link {
    display: block;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(80, 50, 20, 0.22);
    border: 1px solid rgba(160, 120, 60, 0.25);
}

.tr-wotm-thumbnail {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.tr-wotm-thumbnail-link:hover .tr-wotm-thumbnail {
    transform: scale(1.03);
}

/* ── Article block ── */
.tr-wotm-post-block {
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.tr-wotm-post-label {
    font-size: 10px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: #9a7040 !important;
    margin: 0 0 5px !important;
    font-style: normal !important;
    font-family: Georgia, serif !important;
}

.tr-wotm-post-title {
    display: block;
    font-size: 17px !important;
    font-weight: 700 !important;
    font-style: italic !important;
    color: #2a1a08 !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
    font-family: Georgia, serif !important;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.tr-wotm-post-title:hover { color: #7a5030 !important; }

.tr-wotm-post-excerpt {
    font-size: 13px !important;
    color: #5a3e1e !important;
    font-style: italic !important;
    line-height: 1.7 !important;
    margin: 0 !important;
    font-family: Georgia, serif !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ── Ornamental divider ── */
.tr-wotm-divider {
    position: relative;
    height: 20px;
    margin: 12px 0;
    z-index: 1;
    overflow: visible;
}

.tr-wotm-divider::before {
    content: '— ❧ —';
    font-size: 13px;
    color: #b09060;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    background: #f8f0dc;
    padding: 0 8px;
    line-height: 1;
}

.tr-wotm-divider::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 1px;
    background: rgba(160, 130, 80, 0.22);
    z-index: -1;
}

/* ── Comment count badge ── */
.tr-wotm-badge-row {
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.tr-wotm-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(160, 120, 50, 0.10);
    border: 1px solid rgba(160, 120, 50, 0.28);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: #5a3e1e;
    font-family: Georgia, serif;
    font-style: italic;
}

.tr-wotm-badge-icon { font-style: normal; font-size: 13px; }

/* ── CTA links ── */
.tr-wotm-cta {
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 4px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.tr-wotm-cta-link {
    display: inline-block;
    font-size: 12.5px !important;
    font-family: Georgia, serif !important;
    font-style: italic !important;
    color: #7a5030 !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(120, 80, 30, 0.4) !important;
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.tr-wotm-cta-link:hover {
    color: #3a2510 !important;
    border-bottom-color: #3a2510 !important;
}

/* ── Page footer label ── */
.tr-wotm-page-footer {
    text-align: center !important;
    margin: 14px 0 0 !important;
    font-size: 11px !important;
    color: #b09060 !important;
    font-family: Georgia, serif !important;
    font-style: italic !important;
    letter-spacing: 0.5px !important;
    user-select: none;
    position: relative;
    z-index: 1;
}

/* ── Empty state ── */
.tr-wotm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    gap: 12px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.tr-wotm-empty-icon { font-size: 36px; opacity: 0.45; display: block; }

.tr-wotm-empty p {
    font-size: 13px !important;
    color: #9a7040 !important;
    font-style: italic !important;
    font-family: Georgia, serif !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

/* ── Responsive ── */
@media (max-width: 560px) {
    .tr-wotm-widget    { max-width: 100%; }
    .tr-wotm-spine     { width: 28px; }
    .tr-wotm-spine-text{ font-size: 7.5px; letter-spacing: 2px; }
    .tr-wotm-page      { padding: 22px 18px 18px 16px; }
    .tr-wotm-title     { font-size: 18px !important; }
    .tr-wotm-thumbnail { height: 120px; }
}
