/**
 * LCARS Classic Theme - Podcast Styles
 * Video frames, audio players, and podcast elements
 */

/* VIDEO FRAME */
.lcars-video-frame {
    margin: 2rem 0;
    background: var(--moonlit-violet);
    border-radius: 30px 0 0 30px;
    position: relative;
    overflow: hidden;
}

.lvf-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 36px;
    padding-right: 0;
    background: var(--orange);
    border-radius: 30px 0 0 0;
    border-bottom: 4px solid black;
}

.lvf-header span {
    background-color: black;
    padding: 0 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--almond-creme);
    line-height: 32px;
    border-radius: 100vmax 0 0 100vmax;
}

.lvf-body {
    background-color: black;
    margin-left: 35px;
    padding: 1rem;
    border-left: 4px solid black;
}

/* Responsive video container */
.lvf-body iframe,
.lvf-body video,
.lvf-body embed,
.lvf-body object {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 3px solid var(--almond-creme);
    border-radius: 8px;
}

.lvf-footer {
    display: grid;
    grid-template-columns: 30% 20% 1fr 15%;
    margin-left: 55px;
    border-left: 0.5rem solid black;
    background: var(--moonlit-violet);
}

.lvf-block-1 {
    height: 28px;
    background-color: var(--almond-creme);
    border-right: 0.5rem solid black;
}

.lvf-block-2 {
    height: 28px;
    background-color: var(--moonlit-violet);
    border-right: 0.5rem solid black;
}

.lvf-block-3 {
    height: 28px;
    background-color: black;
}

.lvf-block-4 {
    height: 28px;
    background-color: var(--moonlit-violet);
}

/* Hide WordPress default embed wrapper styling when inside LCARS frame */
.lcars-video-frame .wp-block-embed__wrapper {
    position: static;
    padding: 0;
}

/* Remove any WordPress embed figure styling conflicts */
.entry-content figure.wp-block-embed {
    margin: 0;
}

/* Fix for WordPress embed responsive wrapper */
.wp-block-embed__wrapper {
    position: relative;
}

.wp-block-embed__wrapper iframe {
    max-width: 100%;
}

/* AUDIO FRAME */
.lcars-audio-frame {
    margin: 2rem 0;
    background: linear-gradient(var(--bluey) 50%, var(--butterscotch) 50%);
    border-radius: 30px 20px 0 30px;
    position: relative;
}

.lcars-audio-frame::before {
    content: '';
    display: block;
    width: 25px;
    height: 25px;
    background-color: black;
    position: absolute;
    right: 0;
    top: 0;
}

.laf-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 32px;
    padding-right: 30px;
    border-radius: 20px 100vmax 100vmax 0;
    border-right: 25px solid var(--butterscotch);
}

.laf-header span {
    background-color: black;
    padding: 0 1rem;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--sunflower);
    line-height: 32px;
}

.laf-body {
    background-color: black;
    margin-left: 30px;
    padding: 1.5rem;
    border-radius: 16px 0 0 16px;
}

.laf-body audio {
    width: 100%;
}

.laf-body iframe {
    width: 100%;
    min-height: 152px;
    border-radius: 12px;
}

.laf-footer {
    display: grid;
    grid-template-columns: 30% 20% 1fr;
    margin-left: 50px;
    border-left: 0.5rem solid black;
}

.laf-block-1 {
    height: 25px;
    background-color: var(--sunflower);
    border-right: 0.5rem solid black;
}

.laf-block-2 {
    height: 25px;
    background-color: var(--butterscotch);
    border-right: 0.5rem solid black;
}

.laf-block-3 {
    height: 25px;
    background-color: black;
}

/* Spotify specific adjustments */
.lcars-spotify-frame .laf-body {
    padding: 1rem;
}

.lcars-spotify-frame .laf-body iframe {
    min-height: 352px;
}

/* Legacy animated bars (keep for backwards compat) */
.laf-bars {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 1rem;
    background-color: black;
    margin-left: 30px;
}

.laf-bar {
    width: 20px;
    height: 40px;
    background: linear-gradient(var(--butterscotch), var(--orange));
    border-radius: 4px;
    animation: audioBar 1s ease-in-out infinite;
}

.laf-bar:nth-child(1) { animation-delay: 0s; }
.laf-bar:nth-child(2) { animation-delay: 0.1s; }
.laf-bar:nth-child(3) { animation-delay: 0.2s; }
.laf-bar:nth-child(4) { animation-delay: 0.3s; }
.laf-bar:nth-child(5) { animation-delay: 0.4s; }
.laf-bar:nth-child(6) { animation-delay: 0.5s; }

@keyframes audioBar {
    0%, 100% { height: 20px; }
    50% { height: 50px; }
}

/* FEATURED EPISODE */
.featured-episode {
    margin-bottom: 3rem;
}

.featured-post {
    margin-top: 1rem;
}

.featured-header {
    margin-bottom: 1rem;
}

.featured-header .entry-title {
    margin: 0 0 0.5rem 0;
}

.featured-header .entry-title a {
    color: var(--h2-color);
    text-decoration: none;
}

.featured-header .entry-title a:hover {
    filter: brightness(115%);
}

.featured-header .entry-meta {
    margin-bottom: 0;
}

.featured-header .stardate {
    color: var(--orange);
    font-weight: bold;
}

.featured-content {
    margin: 1.5rem 0;
}

/* Remove extra margins from video frames inside featured content */
.featured-content .lcars-video-frame {
    margin-top: 0;
}

.featured-footer {
    margin-top: 1.5rem;
}

/* POST GRID */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* POST CARD */
.post-card {
    background: linear-gradient(135deg, rgba(204, 153, 255, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
    border: 2px solid var(--african-violet);
    border-radius: 20px 8px 8px 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s, transform 0.3s;
}

.post-card:hover {
    border-color: var(--orange);
    transform: translateY(-4px);
}

.card-thumbnail {
    position: relative;
    overflow: hidden;
}

.card-thumbnail img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 100vmax;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-video {
    background-color: var(--red);
    color: white;
}

.badge-audio {
    background-color: var(--bluey);
    color: black;
}

.card-content {
    padding: 1rem;
    flex: 1;
}

.card-title {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.card-title a {
    color: var(--african-violet);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--orange);
}

.card-meta {
    font-size: 0.85rem;
    color: var(--orange);
    margin-bottom: 0.5rem;
}

.card-excerpt {
    font-size: 0.9rem;
    color: var(--font-color);
    opacity: 0.8;
}

.card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(204, 153, 255, 0.2);
}

.card-link {
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--butterscotch);
    text-decoration: none;
}

.card-link:hover {
    color: var(--orange);
}

/* VIEW ALL LINK */
.view-all-link {
    text-align: center;
    margin: 2rem 0;
}

/* EPISODE INFO BAR */
.episode-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem;
    margin: 1rem 0;
    background: rgba(204, 153, 255, 0.1);
    border-left: 4px solid var(--orange);
    border-radius: 0 8px 8px 0;
}

.episode-info-bar span {
    font-weight: bold;
    text-transform: uppercase;
}

.episode-info-bar .season {
    color: var(--bluey);
}

.episode-info-bar .episode {
    color: var(--orange);
}

.episode-info-bar .duration {
    color: var(--butterscotch);
}

/* CREW MEMBER STYLES */
.crew-member {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 2px solid var(--african-violet);
}

.crew-photo {
    max-width: 250px;
}

.crew-data {
    display: flex;
    flex-direction: column;
}

.data-row {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(204, 153, 255, 0.2);
}

.data-label {
    min-width: 100px;
    color: var(--orange);
    font-weight: bold;
    text-transform: uppercase;
}

.data-value {
    color: var(--font-color);
}

.crew-bio {
    margin-top: 1rem;
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .crew-member {
        grid-template-columns: 1fr;
    }
    
    .crew-photo {
        max-width: 100%;
        justify-self: center;
    }
}

/* CONTACT PAGE */
.contact-page .entry-subtitle {
    font-size: 1.5rem;
    color: var(--butterscotch);
    margin-top: -1rem;
}

.comm-interface {
    margin: 2rem 0;
}

.comm-body {
    padding: 1.5rem 0;
}

.comm-info h3,
.comm-form h3 {
    color: var(--orange);
    margin-top: 0;
}

.comm-status {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(204, 153, 255, 0.1);
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* LCARS FORM STYLES */
.lcars-form,
.lcars-contact-form,
.wpcf7-form {
    margin: 1rem 0;
}

.form-row,
.wpcf7-form p {
    margin-bottom: 1.25rem;
}

.lcars-form label,
.lcars-contact-form label,
.wpcf7-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--orange);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.lcars-form input[type="text"],
.lcars-form input[type="email"],
.lcars-form input[type="url"],
.lcars-form input[type="tel"],
.lcars-form textarea,
.lcars-contact-form input[type="text"],
.lcars-contact-form input[type="email"],
.lcars-contact-form textarea,
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--african-violet);
    border-radius: 100vmax;
    color: var(--font-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.lcars-form textarea,
.lcars-contact-form textarea,
.wpcf7-form textarea {
    border-radius: 20px;
    min-height: 150px;
    resize: vertical;
}

.lcars-form input:focus,
.lcars-form textarea:focus,
.lcars-contact-form input:focus,
.lcars-contact-form textarea:focus,
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.3);
}

.form-submit,
.wpcf7-form .wpcf7-submit {
    margin-top: 1.5rem;
}

.wpcf7-form .wpcf7-submit {
    display: inline-block;
    padding: 0.875rem 2rem;
    background-color: var(--african-violet);
    color: black;
    border: none;
    border-radius: 100vmax;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.3s;
}

.wpcf7-form .wpcf7-submit:hover {
    filter: brightness(115%);
}

/* CF7 Response Messages */
.wpcf7-response-output {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
}

.wpcf7-mail-sent-ok {
    background-color: rgba(153, 153, 51, 0.2);
    border: 2px solid var(--green);
    color: var(--green);
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
    background-color: rgba(204, 68, 68, 0.2);
    border: 2px solid var(--red);
    color: var(--tomato);
}

/* RELATED POSTS */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--african-violet);
}

/* TAXONOMY INFO */
.taxonomy-info {
    margin: 1rem 0;
}

.taxonomy-info .col {
    padding: 0.5rem 0;
}

/* RESPONSIVE */
@media (max-width: 750px) {
    .lcars-video-frame {
        border-radius: 20px 15px 0 20px;
    }
    
    .lvf-header {
        height: 28px;
    }
    
    .lvf-header span {
        font-size: 1rem;
        line-height: 28px;
    }
    
    .lvf-body {
        margin-left: 25px;
        padding: 0.75rem;
    }
    
    .lvf-footer {
        margin-left: 40px;
    }
    
    .lvf-block-1,
    .lvf-block-2,
    .lvf-block-3,
    .lvf-block-4 {
        height: 20px;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .lcars-audio-frame {
        border-radius: 20px 15px 0 20px;
    }
    
    .laf-header {
        height: 26px;
    }
    
    .laf-header span {
        font-size: 0.85rem;
        line-height: 26px;
    }
    
    .laf-body {
        margin-left: 20px;
        padding: 1rem;
    }
    
    .laf-footer {
        margin-left: 35px;
    }
    
    .laf-block-1,
    .laf-block-2,
    .laf-block-3 {
        height: 18px;
    }
}

/* Auto-wrapped content images */
.lcars-image-frame {
    max-width: 100%;
}

.lcars-image-frame .imgf-image-body img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure image frames in content don't get too wide */
.entry-content .lcars-image-frame {
    margin: 2rem auto;
}

.entry-content .lcars-image-frame.alignleft {
    float: left;
    margin-right: 2rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.entry-content .lcars-image-frame.alignright {
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

@media (max-width: 600px) {
    .entry-content .lcars-image-frame.alignleft,
    .entry-content .lcars-image-frame.alignright {
        float: none;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }
}
