/*
  theme.css
  Colors were sampled from the fraxtech.com homepage screenshot, since the
  WordPress Customizer settings that actually generate Astra's theme colors
  live in fraxtech.com's database, not in the theme files. If any of these
  are off, send me the exact hex values from Appearance > Customize > Global
  Colors and I'll swap them in.

  Fonts are my best visual approximation (a serif display face for the
  logo/headings, a bold condensed face for big statement text, a clean
  sans-serif for body copy). Let me know the real font names from the
  Customizer's Typography panel for an exact match.
*/

:root {
    --ft-black:      #000000;
    --ft-orange:     #F7941D;
    --ft-orange-dark:#DE8F19;
    --ft-navy:       #212E4A;
    --ft-purple:     #7E84DF;
    --ft-white:      #FFFFFF;
    --ft-text-dark:  #1A1A1A;
    --ft-border:     #CCCCCC;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    color: var(--ft-text-dark);
    background: var(--ft-white);
}

a { color: var(--ft-orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header / nav ---------- */
.ft-header {
    background: var(--ft-black);
    color: var(--ft-white);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    border-bottom: 3px solid var(--ft-orange);
}

.ft-header .ft-brand {
    display: flex;
    flex-direction: column;
}

.ft-header .ft-brand .ft-site-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--ft-orange);
}

.ft-header .ft-brand .ft-tagline {
    font-size: 0.8em;
    color: var(--ft-orange);
}

.ft-nav {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.ft-nav a {
    color: var(--ft-white);
    font-weight: 600;
}

.ft-nav a.active,
.ft-nav a:hover {
    color: var(--ft-orange);
}

/* ---------- Page hero / title bar ---------- */
.ft-hero {
    background: linear-gradient(120deg, var(--ft-orange) 0%, var(--ft-purple) 100%);
    padding: 30px 20px;
    text-align: center;
}

.ft-hero h1 {
    font-family: 'Anton', 'Oswald', Impact, sans-serif;
    color: var(--ft-text-dark);
    font-size: 2.4em;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- Page body wrapper ---------- */
.ft-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* ---------- Buttons ---------- */
.ft-btn,
input[type="submit"],
input[type="button"] {
    background: var(--ft-orange);
    color: var(--ft-black);
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.ft-btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: var(--ft-orange-dark);
}

/* ---------- Forms ---------- */
.ft-form label,
.ft-form p {
    display: block;
    margin: 12px 0;
    font-weight: 600;
}

.ft-form input[type="text"],
.ft-form input[type="number"],
.ft-form input[type="password"],
.ft-form select {
    width: 100%;
    max-width: 420px;
    padding: 8px 10px;
    border: 1px solid var(--ft-border);
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
}

/* ---------- Movie/TV cards (poster left, info right) ---------- */
.ft-entry-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ft-entry-card {
    display: flex;
    gap: 18px;
    background: var(--ft-white);
    border: 1px solid var(--ft-border);
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.ft-entry-card .ft-poster {
    flex: 0 0 110px;
}

.ft-entry-card .ft-poster img {
    width: 110px;
    height: 165px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--ft-navy);
}

.ft-entry-card .ft-poster .ft-poster-placeholder {
    width: 110px;
    height: 165px;
    border-radius: 4px;
    background: var(--ft-navy);
    color: var(--ft-white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75em;
    font-weight: 700;
    padding: 8px;
}

.ft-entry-card .ft-info-box {
    flex: 1;
    background: #FAFAFA;
    border: 1px solid var(--ft-border);
    border-radius: 6px;
    padding: 12px 16px;
}

.ft-entry-card .ft-info-box h3 {
    margin: 0 0 6px;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--ft-navy);
}

.ft-entry-card .ft-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    font-size: 0.92em;
    margin-bottom: 6px;
}

.ft-entry-card .ft-meta-row span strong {
    color: var(--ft-navy);
}

.ft-entry-card .ft-actions {
    margin-top: 8px;
}

.ft-badge {
    display: inline-block;
    background: var(--ft-navy);
    color: var(--ft-white);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ---------- Live title-search dropdown (Add/Edit pages) ---------- */
.ft-search-wrap {
    position: relative;
    max-width: 420px;
}

.ft-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--ft-white);
    border: 1px solid var(--ft-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.ft-search-results .ft-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    cursor: pointer;
    border-bottom: 1px solid #EEEEEE;
}

.ft-search-results .ft-search-item:last-child { border-bottom: none; }

.ft-search-results .ft-search-item:hover,
.ft-search-results .ft-search-item.ft-active {
    background: #FDF0DE;
}

.ft-search-results .ft-search-item img {
    width: 32px;
    height: 48px;
    object-fit: cover;
    border-radius: 2px;
    background: var(--ft-navy);
    flex: 0 0 32px;
}

.ft-search-results .ft-search-item .ft-search-placeholder {
    width: 32px;
    height: 48px;
    background: var(--ft-navy);
    border-radius: 2px;
    flex: 0 0 32px;
}

.ft-search-results .ft-search-empty {
    padding: 10px;
    color: #777;
    font-size: 0.9em;
}

/* ---------- Filter / sort bar (View Collection) ---------- */
.ft-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    background: #FAFAFA;
    border: 1px solid var(--ft-border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.ft-filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85em;
    font-weight: 700;
    color: var(--ft-navy);
}

.ft-filter-bar select {
    padding: 7px 10px;
    border: 1px solid var(--ft-border);
    border-radius: 4px;
    font-size: 0.95em;
    font-family: inherit;
    min-width: 160px;
}

.ft-clear-btn {
    background: #EEEEEE;
    color: var(--ft-text-dark);
    align-self: center;
}

.ft-clear-btn:hover {
    background: #DDDDDD;
    text-decoration: none;
}

.ft-notice {
    background: #FDF0DE;
    border: 1px solid var(--ft-orange);
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.9em;
}

/* ---------- Poster grid (View Collection, Plex-style) ---------- */
.ft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 22px 16px;
}

.ft-grid-card {
    position: relative;
    display: block;
    color: inherit;
    text-decoration: none;
}

.ft-grid-card:hover { text-decoration: none; }

.ft-grid-poster img,
.ft-grid-poster .ft-poster-placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    background: var(--ft-navy);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.12s ease;
}

.ft-grid-card:hover .ft-grid-poster img,
.ft-grid-card:hover .ft-grid-poster .ft-poster-placeholder {
    transform: scale(1.03);
}

.ft-grid-poster .ft-poster-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75em;
    font-weight: 700;
    color: var(--ft-white);
    padding: 8px;
}

.ft-grid-caption {
    margin-top: 6px;
}

.ft-grid-title {
    font-weight: 700;
    font-size: 0.92em;
    color: var(--ft-navy);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ft-grid-subtitle {
    font-size: 0.82em;
    color: #666666;
}

/* Hover info panel: a compact copy of the old poster+info row card */
.ft-hover-info {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -8px);
    width: 300px;
    max-width: 80vw;
    display: flex;
    gap: 10px;
    background: var(--ft-white);
    border: 1px solid var(--ft-border);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease;
    z-index: 20;
}

.ft-grid-card:hover .ft-hover-info {
    opacity: 1;
    visibility: visible;
}

.ft-hover-poster {
    flex: 0 0 70px;
}

.ft-hover-poster img,
.ft-hover-poster .ft-poster-placeholder {
    width: 70px;
    height: 105px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--ft-navy);
}

.ft-hover-poster .ft-poster-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ft-white);
    font-size: 0.65em;
    font-weight: 700;
    text-align: center;
}

.ft-hover-details {
    flex: 1;
    min-width: 0;
}

.ft-hover-details h4 {
    margin: 0 0 6px;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--ft-navy);
    font-size: 1em;
}

.ft-hover-details .ft-meta-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8em;
    margin-bottom: 4px;
}

.ft-hover-details .ft-meta-row span strong {
    color: var(--ft-navy);
}

/* ---------- Movie details page ---------- */
.ft-detail-card {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.ft-detail-poster {
    flex: 0 0 240px;
}

.ft-detail-poster img,
.ft-poster-placeholder-large {
    width: 240px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.ft-poster-placeholder-large {
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ft-navy);
    color: var(--ft-white);
    font-weight: 700;
}

.ft-tmdb-link {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9em;
}

.ft-detail-info {
    flex: 1;
    min-width: 260px;
}

.ft-detail-info h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--ft-navy);
    margin-top: 0;
}

.ft-detail-info .ft-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: 1em;
    margin-bottom: 10px;
}

.ft-detail-info .ft-meta-row span strong {
    color: var(--ft-navy);
}

.ft-detail-info .ft-actions {
    margin-top: 18px;
}

/* ---------- Misc ---------- */
.ft-error { color: #C0392B; font-weight: 600; }
.ft-success { color: #1E7A32; font-weight: 600; }

table.ft-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

table.ft-table th,
table.ft-table td {
    border: 1px solid var(--ft-border);
    padding: 8px 10px;
    text-align: left;
}

table.ft-table th {
    background: var(--ft-navy);
    color: var(--ft-white);
}
