/* Joomla AI Writer & SEO Suite v3.0.8 - Frontend Watch Page Styles (Template-Inheriting, YOOtheme & Cassiopeia Compatible) */

.aiw-watchpage,
.aiw-watchpages-index {
    max-width: 1160px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2.25rem) clamp(1rem, 2.5vw, 1.5rem) 3rem;
    font-family: inherit;
    color: inherit;
    box-sizing: border-box;
}

.aiw-wp-preview-banner {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1.15rem;
    border-radius: 0.45rem;
    border: 1px solid #d97706;
    background: #fef3c7;
    color: #78350f;
    font-size: 0.92rem;
}

.aiw-wp-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.aiw-wp-breadcrumb li + li::before {
    content: "/";
    margin-right: 0.4rem;
    opacity: 0.6;
}

.aiw-wp-header {
    margin-bottom: 1.5rem;
}

.aiw-wp-title {
    margin: 0 0 0.45rem;
    line-height: 1.2;
}

.aiw-wp-subtitle {
    margin: 0;
    opacity: 0.82;
    font-size: 1.08rem;
    line-height: 1.45;
}

.aiw-wp-stage {
    margin-bottom: 2rem;
}

.aiw-wp-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    border-radius: 0.55rem;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.aiw-wp-player video,
.aiw-wp-player iframe.aiw-wp-iframe,
.aiw-wp-poster {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
}

.aiw-wp-play-btn {
    position: absolute;
    inset: 0;
    margin: auto;
    width: fit-content;
    height: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.95rem 1.65rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease;
}

.aiw-wp-play-btn:hover,
.aiw-wp-play-btn:focus-visible {
    background: #0d6efd;
    transform: scale(1.04);
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.aiw-wp-consent-note {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0.6rem 1rem;
    background: rgba(15, 23, 42, 0.84);
    color: #f8fafc;
    font-size: 0.82rem;
    text-align: center;
}

/* Accessible Inline Cookie Consent Gate Overlay (never calls YouTube until user explicitly grants consent) */
.aiw-wp-consent-gate {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    text-align: center;
    z-index: 4;
}

.aiw-wp-consent-gate p {
    max-width: 560px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.aiw-wp-consent-gate-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.aiw-wp-consent-accept,
.aiw-wp-consent-prefs,
.aiw-wp-consent-cancel {
    padding: 0.65rem 1.2rem;
    border-radius: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.aiw-wp-consent-accept {
    background: #0d6efd;
    color: #ffffff;
}

.aiw-wp-consent-prefs,
.aiw-wp-consent-cancel {
    background: transparent;
    color: #f8fafc;
    border-color: rgba(248, 250, 252, 0.55);
}

.aiw-wp-details {
    margin-bottom: 2.25rem;
}

.aiw-wp-description p {
    margin: 0 0 1rem;
    line-height: 1.65;
}

.aiw-wp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2.25rem;
    margin: 1.25rem 0 1.5rem;
    padding: 0.9rem 0;
    border-top: 1px solid rgba(128, 128, 128, 0.3);
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
}

.aiw-wp-meta dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.72;
}

.aiw-wp-meta dd {
    margin: 0.2rem 0 0;
    font-weight: 600;
}

.aiw-wp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.aiw-wp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    line-height: 1.35;
}

.aiw-wp-btn-secondary {
    padding: 0.6rem 1.15rem;
    border: 1px solid currentColor;
    border-radius: 0.35rem;
    font-weight: 500;
}

.aiw-wp-pager {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.aiw-wp-related-heading {
    margin: 0 0 1rem;
    font-size: 1.35rem;
}

.aiw-wp-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.aiw-wp-related-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(128, 128, 128, 0.25);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.aiw-wp-related-card:hover,
.aiw-wp-related-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    outline: 2px solid #0d6efd;
}

.aiw-wp-related-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.aiw-wp-related-title {
    padding: 0.75rem 0.9rem;
    font-weight: 600;
    font-size: 0.94rem;
    line-height: 1.35;
}

/* Source Article Non-Invasive Watch Page Links */
.aiw-source-watch-links {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(128, 128, 128, 0.25);
}

.aiw-source-watch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.aiw-source-watch-btn {
    display: inline-block;
    padding: 0.5rem 0.95rem;
    border-radius: 0.35rem;
    border: 1px solid currentColor;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.aiw-watchpage-link-wrap,
.aiw-inline-watch-wrap {
    margin-top: 0.45rem;
}

.aiw-watchpage-link,
.aiw-inline-watch-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.aiw-watchpage-link:hover,
.aiw-watchpage-link:focus-visible {
    text-decoration: none;
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .aiw-wp-play-btn {
        padding: 0.75rem 1.2rem;
        font-size: 0.92rem;
    }
    .aiw-wp-pager {
        flex-direction: column;
    }
}
