/**
 * TrueBlood - Story WP & "You Have Missed" Styles
 *
 * @package TrueBlood
 */

/* ==========================================================================
   1. Story WP Tray
   ========================================================================== */
.trueblood-stories-section {
    background: #ffffff;
    border-bottom: 1px solid #eee;
    padding: 18px 0 16px;
    position: relative;
    z-index: 10;
}

.trueblood-stories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.trueblood-stories-heading {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111111;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.story-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #b3001b;
    box-shadow: 0 0 0 0 rgba(179, 0, 27, 0.7);
    animation: storyPulse 1.8s infinite;
    display: inline-block;
}

@keyframes storyPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(179, 0, 27, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(179, 0, 27, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(179, 0, 27, 0);
    }
}

.trueblood-stories-nav {
    display: flex;
    gap: 6px;
}

.story-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #dcdfe4;
    background: #ffffff;
    color: #333333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.story-nav-btn:hover {
    background: #b3001b;
    border-color: #b3001b;
    color: #ffffff;
    transform: translateY(-1px);
}

.story-nav-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.trueblood-stories-track-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.trueblood-stories-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 2px 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.trueblood-stories-track::-webkit-scrollbar {
    display: none;
}

/* Story Item */
.trueblood-story-item {
    flex: 0 0 auto;
    width: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
    outline: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.trueblood-story-item:hover,
.trueblood-story-item:focus {
    transform: translateY(-3px);
}

.story-avatar-wrap {
    width: 72px;
    height: 72px;
    position: relative;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}

.story-gradient-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #b3001b 0%, #ff4b4b 50%, #800020 100%);
    transition: transform 0.3s ease;
}

.trueblood-story-item:hover .story-gradient-ring {
    transform: scale(1.04);
}

.trueblood-story-item.is-viewed .story-gradient-ring {
    background: #c3c4c7;
}

.story-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    position: relative;
    z-index: 1;
    display: block;
    background: #f0f0f0;
}

.story-item-label {
    margin-top: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.25;
    color: #222222;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
    word-break: break-word;
}

/* ==========================================================================
   2. TrueBlood Story Fullscreen Modal Viewer
   ========================================================================== */
.trueblood-story-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.trueblood-story-modal.is-active {
    display: flex;
    opacity: 1;
}

.story-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.story-modal-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    height: 92vh;
    max-height: 780px;
    background: #111111;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

@media (max-width: 575px) {
    .story-modal-card {
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

/* Story Progress Bars */
.story-modal-progress-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 30;
    display: flex;
    gap: 4px;
}

.story-progress-bar-slot {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.story-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    transition: width 0.1s linear;
}

.story-progress-bar-fill.is-completed {
    width: 100%;
}

/* Story Header */
.story-modal-header {
    position: absolute;
    top: 22px;
    left: 14px;
    right: 14px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.story-modal-author-meta {
    display: flex;
    align-items: center;
    gap: 9px;
}

.story-modal-author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    object-fit: cover;
}

.story-modal-author-info {
    display: flex;
    flex-direction: column;
}

.story-modal-author-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
}

.story-modal-time {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.story-modal-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.story-modal-control-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.story-modal-control-btn:hover {
    background: rgba(179, 0, 27, 0.85);
    border-color: #b3001b;
}

.story-modal-control-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Stage & Background */
.story-modal-stage {
    position: relative;
    flex: 1;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 20px;
}

.story-modal-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
}

.story-modal-stage-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.1) 25%,
        rgba(0, 0, 0, 0.2) 55%,
        rgba(0, 0, 0, 0.95) 100%
    );
    pointer-events: none;
}

/* Tap Zones */
.story-tap-zone {
    position: absolute;
    top: 60px;
    bottom: 90px;
    z-index: 20;
    cursor: pointer;
}

.story-tap-prev {
    left: 0;
    width: 35%;
}

.story-tap-next {
    right: 0;
    width: 65%;
}

/* Caption */
.story-modal-caption {
    position: relative;
    z-index: 25;
    margin-bottom: 12px;
}

.story-modal-category-badge {
    display: inline-block;
    background: #b3001b;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.story-modal-title {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* Story Modal Footer / CTA */
.story-modal-footer {
    position: relative;
    z-index: 30;
    padding: 0 20px 20px;
    background: transparent;
}

.story-modal-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #b3001b 0%, #800020 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(179, 0, 27, 0.4);
    transition: all 0.25s ease;
}

.story-modal-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(179, 0, 27, 0.6);
    background: linear-gradient(135deg, #cc001f 0%, #990026 100%);
}

.story-modal-cta-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   3. "You Have Missed" Section Styles
   ========================================================================== */
.trueblood-you-have-missed-section {
    background: #fafafa;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    padding: 4.8rem 0;
    margin-top: 3.2rem;
    margin-bottom: 2rem;
}

.you-have-missed-header {
    margin-bottom: 2.8rem;
    position: relative;
}

.you-have-missed-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.you-have-missed-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #b3001b;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 20px;
}

.missed-flame-icon {
    font-size: 1.2rem;
}

.you-have-missed-title {
    font-family: var(--wpi--site-title-font-family, serif);
    font-size: 2.8rem;
    font-weight: 900;
    color: #111111;
    margin: 4px 0 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.you-have-missed-subtitle {
    font-size: 1.3rem;
    color: #666666;
    margin: 0;
    line-height: 1.4;
}

.you-have-missed-header-line {
    width: 60px;
    height: 3px;
    background: #b3001b;
    margin-top: 12px;
    border-radius: 2px;
}

/* Missed Card */
.trueblood-missed-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.trueblood-missed-card:hover {
    transform: translateY(-4px);
    border-color: #f0c5ca;
    box-shadow: 0 10px 24px rgba(179, 0, 27, 0.12);
}

.missed-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1a1a1a;
}

.missed-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.trueblood-missed-card:hover .missed-thumbnail-img {
    transform: scale(1.06);
}

.missed-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #b3001b;
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.missed-cat-badge:hover {
    background: #800020;
}

.missed-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.missed-card-title {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
}

.missed-card-title a {
    color: #111111;
    text-decoration: none;
    transition: color 0.2s ease;
}

.missed-card-title a:hover {
    color: #b3001b;
}

.missed-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.15rem;
    color: #777777;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f2f2f2;
}

.missed-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.missed-meta-item .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
    color: #b3001b;
}
