/**
 * TMDB Post Header Stíluslap v2
 * Tartalmazza az alapvető elrendezést, a meta adatok stílusait,
 * az interakciós gombokat, tooltipeket és a reszponzív nézetet.
 */

/* ===================================================================
   1. Globális és Alapértelmezett Beállítások
   =================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

.tmdb__post__wrapper {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    min-height: 650px;
}

.tmdb__post__header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-height: 650px;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    padding: 10px;
    transition: all 0.3s ease;
}

/* ===================================================================
   2. Header Komponensek (Háttér, Poszter, Tartalom)
   =================================================================== */

.tmdb__post__header .tmdb__post__backdrop {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tmdb__post__header .tmdb__post__backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s ease;
}

.tmdb__post__header .tmdb__post__backdrop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); 
    z-index: 1;
    transition: all 0.3s ease;
}

.tmdb__post__header .tmdb__post__content {
    display: flex;
    align-items: center; 
    position: absolute; 
    top: 50%; 
    left: 25px;
    transform: translateY(-50%);
    z-index: 2; 
    transition: all 0.3s ease;
}

.tmdb__post__header .tmdb__post__poster {
    width: 400px;
    height: 600px;
    margin-right: 100px;
    position: relative;
    transition: all 0.3s ease;
}

.tmdb__post__header .tmdb__post__poster img {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    transition: all 0.3s ease;
}

/* ===================================================================
   3. Meta Tartalom (Címek, Jelvények, Adatok)
   =================================================================== */

.tmdb__post__header .tmdb__post__meta {
    flex: 1;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* Fordítási állapot jelvények */
.tmdb__post__header .tmdb__post__content .tmdb__post__meta p.tmdb__post__translation__status {
    text-transform: uppercase;
    font-weight: 600;
    max-width: 140px;
    font-size: 12px;
    border-radius: 5px;
    padding: 5px 10px;
    text-align: center;
    display: inline-block;
}

p.tmdb__post__translation__status#completed {
    background-color: grey;
}

p.tmdb__post__translation__status#under__translation {
    background-color: hsl(228, 85%, 63%);
}

p.tmdb__post__translation__status#coming__soon {
    background-color: #F18A50;
}

/* Speciális "Kurocchii" és "Platform" jelvények */
.tmdb__post__header .tmdb__post__content .tmdb__post__meta p.tmdb__post__kurocchii {
    text-transform: uppercase;
    font-weight: 600;
    color: black;
    max-width: 200px;
    font-size: 12px;
    border-radius: 5px;
    padding: 5px 10px;
    text-align: center;
    display: inline-block;
    margin-left: 5px;
}

p.tmdb__post__kurocchii {
    background: linear-gradient(to right, rgb(168, 173, 227), rgb(241, 214, 80));
}

p.tmdb__post__kurocchii#platform {
    background: linear-gradient(to right, rgb(32, 132, 122), rgb(99, 7, 138));
    color: white;
}

/* Címek és egyéb adatok */
.tmdb__post__header .tmdb__post__content .tmdb__post__meta .tmdb__post__title {
    font-size: 48px;
    font-weight: 700;
}

.tmdb__post__header .tmdb__post__content .tmdb__post__meta .tmdb__post__original_title {
    font-size: 20px;
    font-weight: normal;
}

.tmdb__post__header .tmdb__post__content .tmdb__post__meta .tmdb__post__detals {
    max-width: 350px;
    margin: 30px 0;
}

.tmdb__post__header .tmdb__post__content .tmdb__post__meta .tmdb__post__detals .tmdb__post__year {
    padding: 5px 20px;
    border: 2px solid white;
    font-weight: 600;
    margin: 10px 10px 10px 0;
    display: inline-block;
    border-radius: 5px;
}

.tmdb__post__header .tmdb__post__content .tmdb__post__meta .meta__place__name {
    display: inline-block;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    width: 130px;
    line-height: 40px;
}

.tmdb__post__header .tmdb__post__content .tmdb__post__meta .download__output {
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.tmdb__post__header .tmdb__post__content .tmdb__post__meta .tmdb__post__genere, 
.tmdb__post__header .tmdb__post__content .tmdb__post__meta .tmdb__post__actors, 
.tmdb__post__header .tmdb__post__content .tmdb__post__meta .tmdb__post__category,
.tmdb__post__header .tmdb__post__content .tmdb__post__meta .tmdb__post__download {
    max-width: 700px;
}

.tmdb__post__header .tmdb__post__content .tmdb__post__meta a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
}

.tmdb__post__header .tmdb__post__content .tmdb__post__meta a:hover {
    color: rgba(255, 255, 255, 0.477);
}


/* ===================================================================
   4. Interakciós Gombok és Tooltipek - JAVÍTOTT, EGYSÉGESÍTETT
   =================================================================== */

/* Általános konténer az összes gombhoz.
   Fix méretet és flexbox igazítást használunk az egységes kinézethez. */
.tmdb__post__watch__and__save {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-top: 20px;
    margin-right: 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    position: relative; /* Szükséges a tooltip pozicionálásához */
}

/* Általános ikon és link stílus a gombokon belül */
.tmdb__post__watch__and__save i,
.tmdb__post__watch__and__save a {
    color: white;
    font-size: 1.5rem; /* Ikon méret */
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lejátszás (#watch) és Megnézett (#watched) gombok háttérszíne */
.tmdb__post__watch__and__save#watch,
.tmdb__post__watch__and__save#watched {
    background-color: hsl(228, 85%, 63%);
}

.tmdb__post__watch__and__save#watch:hover,
.tmdb__post__watch__and__save#watched:hover {
    background-color: hsl(228, 54%, 52%);
    transform: scale(1.1);
}

/* Speciális stílusok a MENTÉS (#save) gombhoz, ami a bővítmény miatt trükkös */
.tmdb__post__watch__and__save#save {
    background-color: hsl(228, 54%, 52%);
    font-size: 1.8rem; /* A '+' jel méretét itt állítjuk */
    margin-right: 10px;
}

.tmdb__post__watch__and__save#save:hover {
    background-color: hsl(228, 54%, 52%);
    transform: scale(1.1);
}

/* EZZEL A LÉNYEG: Felülírjuk a bővítmény által generált link stílusát,
   hogy átvegye a szülő div kinézetét. */
.tmdb__post__watch__and__save#save .um-clear a,
.tmdb__post__watch__and__save#save .um-unbookmark a {
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
    height: 100%;
    line-height: normal;
    border-radius: 50%;
    font-weight: 300;
}

/* Tooltip buborék (a data-tooltip attribútumból jön a szöveg) */
.tmdb__post__watch__and__save::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    background-color: #1a1d29;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10;
    
    /* Kezdeti állapot az animációhoz */
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* Amikor az egér a gomb fölött van, a tooltip megjelenik */
.tmdb__post__watch__and__save:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}


/* ===================================================================
   5. Reszponzív Stílusok (Media Query)
   =================================================================== */

@media screen and (max-width: 1200px) {
    .tmdb__post__wrapper {
        min-height: auto;
    }

    .tmdb__post__header {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        max-height: none;
        height: auto;
        padding: 10px;
        min-height: auto;
    }

    .tmdb__post__header .tmdb__post__backdrop {
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 0;
    }

    .tmdb__post__header .tmdb__post__content {
        flex-direction: column;
        align-items: center;
        position: static;
        transform: none;
        width: 100%;
        margin: 0;
    }

    .tmdb__post__header .tmdb__post__poster {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 80%;
        max-width: 300px;
        height: auto;
        margin-top: 10px;
        margin-bottom: 20px;
        margin-right: 0;
    }

    .tmdb__post__header .tmdb__post__poster img {
        display: block;
        margin: 0 auto;
        width: 100%;
        height: auto;
    }

    .tmdb__post__header .tmdb__post__meta {
        max-width: 90%;
        text-align: center;
    }

    .tmdb__post__header .tmdb__post__meta .tmdb__post__title,
    .tmdb__post__header .tmdb__post__meta .tmdb__post__original_title {
        text-align: center;
    }

    .tmdb__post__header .tmdb__post__meta .tmdb__post__detals,
    .tmdb__post__header .tmdb__post__meta .tmdb__post__genere,
    .tmdb__post__header .tmdb__post__meta .tmdb__post__actors,
    .tmdb__post__header .tmdb__post__meta .tmdb__post__category,
    .tmdb__post__header .tmdb__post__meta .tmdb__post__download {
        text-align: left;
    }

    .tmdb__post__header__sidebar {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }

    /* Reszponzív komment szekció igazítások - ezeket a fájl végén hagytam,
       mivel valószínűleg egy másik komponenshez tartoznak. */
    ol.children {
        margin-left: 0px !important;
    }

    .comment-author cite.fn {
        min-width: 100%;
    }

    .comment-author {
        min-width: 100%;
    }

    .comment-body img {
        width: 60px;
        height: 60px;
    }

    .comment-author cite.fn {
        margin-left: -37px;
    }

    .comment-author-header {
        margin-left: -20px;
    }

    .comment-time-under {
        margin-left: 37px;
    }
}

/* ===================================================================
   7. "Mentett Tartalmak" Lista Stílusai ([bookmarked_posts_list])
   =================================================================== */

/* Ugyanazt a stílust alkalmazzuk a mentett listára is, mint a megnézettre */
.bookmarked-posts-list-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 0 20px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #4a4e64 #1a1d29;
}

.bookmarked-posts-list-wrapper::-webkit-scrollbar {
    height: 8px;
}
.bookmarked-posts-list-wrapper::-webkit-scrollbar-track {
    background: rgba(26, 29, 41, 0.5);
    border-radius: 4px;
}
.bookmarked-posts-list-wrapper::-webkit-scrollbar-thumb {
    background-color: #4a4e64;
    border-radius: 4px;
}
.bookmarked-posts-list-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #686d91;
}

/* A kártyák kinézetét már a .watched-post-item definiálja,
   amit újrahasznosítunk, így itt nincs további teendő. */