/**
 * Questionable Choice of the Week - Spotlight Styles
 * VERSION 2: With frame overlay support
 * 
 * Save as: css/questionable-choice-spotlight.css
 * 
 * FRAME IMAGES GO IN: /images/frames/
 *   - frames_2-3.png
 *   - frames_2-6.png
 *   - slice4.png
 *   - slice6.png
 *   - slice7.png
 */

/* ================================
   Spotlight Container
   ================================ */
.questionable-choice-spotlight {
    background: #fffef9;
    border: 2px solid #2d2d2d;
    border-radius: 4px;
    max-width: 420px;
    margin: 2rem auto;
    overflow: visible; /* Allow frame to extend outside */
    position: relative;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

/* ================================
   Header
   ================================ */
.qc-header {
    background: #2d2d2d;
    padding: 0.75rem 1rem;
    text-align: center;
}

.qc-label {
    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    color: #f5f5f5;
    letter-spacing: 0.5px;
}

/* ================================
   Content Area
   ================================ */
.qc-content {
    padding: 1.25rem;
}

/* ================================
   Media Container - Polaroid Style
   ================================ */
.qc-media {
    position: relative;
    margin-bottom: 1rem;
    background: #ffffff;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Landscape orientation (wider than tall) */
.qc-media.landscape {
    padding: 12px 12px 60px 12px;
    transform: rotate(-2deg);
}

/* Portrait orientation (taller than wide) */
.qc-media.portrait {
    padding: 16px 16px 70px 16px;
    transform: rotate(2deg);
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
}

/* Landscape images */
.qc-media.landscape img {
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* Portrait images */
.qc-media.portrait img {
    aspect-ratio: 3/4;
    object-fit: cover;
}

/* Landscape videos - 16:9 aspect ratio */
.qc-media.landscape iframe,
.qc-media.landscape .wp-block-embed__wrapper iframe,
.qc-media.landscape .fluid-width-video-wrapper iframe {
    aspect-ratio: 16/9;
}

/* Portrait videos - 9:16 aspect ratio */
.qc-media.portrait iframe,
.qc-media.portrait .wp-block-embed__wrapper iframe,
.qc-media.portrait .fluid-width-video-wrapper iframe {
    aspect-ratio: 9/16;
}

.qc-media:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 12px 24px rgba(0, 0, 0, 0.15);
}

.qc-media img {
    width: 100%;
    height: auto;
    display: block;
}

.qc-media iframe,
.qc-media .wp-block-embed__wrapper iframe,
.qc-media .fluid-width-video-wrapper iframe {
    width: 100%;
    display: block;
}

/* Handle oEmbed wrapper divs */
.qc-media .wp-block-embed__wrapper,
.qc-media .fluid-width-video-wrapper {
    position: relative;
    width: 100%;
}

/* Force video containers to be landscape */
.qc-media.qc-video {
    padding: 12px 12px 60px 12px;
    transform: rotate(-2deg);
}

/* ================================
   Tape Element
   ================================ */
.qc-media::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 28px;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    background: linear-gradient(
        90deg,
        rgba(255, 248, 220, 0.65) 0%,
        rgba(255, 248, 220, 0.8) 50%,
        rgba(255, 248, 220, 0.65) 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

/* Handwritten polaroid caption */
.qc-media::after {
    content: attr(data-caption);
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: #333;
    text-align: center;
}

/* ================================
   Title
   ================================ */
.qc-title {
    font-family: 'Caveat', cursive;
    font-size: 2.75rem;
    color: #2d2d2d;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

/* ================================
   Description
   ================================ */
.qc-description {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #4a4a4a;
    line-height: 1.5;
}

.qc-description p {
    margin: 0 0 0.75rem 0;
}

.qc-description p:last-child {
    margin-bottom: 0;
}

/* ================================
   Related Post Link
   ================================ */
.qc-related-link {
    display: inline-block;
    margin-top: 1rem;
    font-family: 'Caveat', cursive;
    font-size: 1.25rem;
    color: #4a9b9b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.qc-related-link:hover {
    color: #2d7a7a;
    text-decoration: underline;
}

/* ================================
   Footer
   ================================ */
.qc-footer {
    background: #f9f9f6;
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px dashed #d0d0d0;
}

.qc-archive-link {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}

.qc-archive-link:hover {
    color: #4a9b9b;
    text-decoration: none;
}

/* ================================
   Handwritten Annotation
   ================================ */
.questionable-choice-spotlight::after {
    content: '* no regrets';
    position: absolute;
    bottom: -24px;
    right: 10px;
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: #888;
    transform: rotate(-3deg);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 480px) {
    .questionable-choice-spotlight {
        max-width: 100%;
        margin: 1.5rem 1rem 2rem;
    }

    .qc-label {
        font-size: 1.4rem;
    }

    .qc-title {
        font-size: 1.5rem;
    }

    /* Reduce polaroid padding on mobile */
    .qc-media {
        padding: 8px 8px 40px 8px;
        transform: rotate(-1deg);
    }

    .qc-media::before {
        width: 60px;
        height: 22px;
    }
}

/* ================================
   Homepage Placement
   ================================ */
.home .questionable-choice-spotlight {
    margin: 3rem auto;
}

/* ================================
   Widget (Shortcode) Compact Mode
   ================================ */
.qc-widget {
    max-width: 100%;
    border-width: 1px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08);
}

.qc-widget .qc-content {
    padding: 0.75rem;
}

.qc-widget .qc-label {
    font-size: 1.1rem;
}

.qc-widget .qc-title {
    font-size: 1.25rem;
}

.qc-widget .qc-media {
    max-width: 100%;
    height: 200px;
    overflow: hidden;
    padding: 0;
}

.qc-widget .qc-media.qc-video,
.qc-widget .qc-media.qc-video-thumb {
    transform: none;
    padding: 0;
    height: 200px;
    overflow: hidden;
}

.qc-widget .qc-media img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.qc-widget .qc-media iframe {
    width: 100% !important;
    height: 200px !important;
}

.qc-widget .qc-media .wp-block-embed__wrapper,
.qc-widget .qc-media .fluid-width-video-wrapper {
    padding-bottom: 0 !important;
    height: 200px !important;
    overflow: hidden;
}

/* Video thumbnail play button overlay */
.qc-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    z-index: 10;
    pointer-events: none;
}

.qc-play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.9);
}

.qc-video-thumb:hover .qc-play-btn {
    background: rgba(0, 0, 0, 0.75);
}

.qc-widget .qc-media.portrait {
    max-width: 85%;
}

.qc-widget .qc-media::before {
    width: 60px;
    height: 22px;
}
