/*
 * CineMax — engine.css
 * Component & form styles
 */

/* ── Messages / Alerts ────────────────────────── */
.message-info {
    color: var(--tt); line-height: 1.5; margin-bottom: 20px;
    background: var(--bg-accent); border-radius: var(--radius);
    border-left: 4px solid var(--accent); padding: 15px 20px;
}
.message-info__title { font-weight: 600; }
.message-info a { color: var(--accent); }

/* ── Forms ─────────────────────────────────────── */
.form__row { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 16px; gap: 12px; }
.form__caption { width: 160px; font-size: 13px; font-weight: 500; color: var(--tt-2); }
.form__content { flex: 1; min-width: 0; }

input[type="text"], input[type="password"], input[type="email"],
select, textarea {
    width: 100%; height: 42px; padding: 0 16px;
    background: var(--bg-darker); color: var(--tt);
    border: 1px solid var(--bdc-2); border-radius: var(--radius);
    font-size: 14px; font-family: inherit; transition: border-color .2s;
}
input:focus, textarea:focus { border-color: var(--accent); }
textarea { height: auto; min-height: 100px; padding: 12px 16px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--tt-3); }

/* ── Login / Auth Modal ───────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: none; place-items: center;
}
.modal-overlay.is-open { display: grid; }
.modal {
    background: var(--bg); border-radius: var(--radius-lg);
    padding: 32px; width: 90%; max-width: 400px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.modal__title { font-size: 20px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.modal__close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; background: none; color: var(--tt-3);
    font-size: 18px; cursor: pointer; padding: 0;
}
.modal__footer { text-align: center; margin-top: 16px; font-size: 13px; color: var(--tt-3); }
.modal__footer a { color: var(--accent); }

/* ── Comment Section ──────────────────────────── */
.comments { margin-top: 30px; }
.comments__title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.comment-item {
    display: flex; gap: 14px; padding: 16px 0;
    border-bottom: 1px solid var(--bdc-2);
}
.comment-item__avatar {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    background: var(--bg-accent); display: grid; place-items: center;
    font-size: 16px; font-weight: 700; color: var(--accent);
}
.comment-item__author { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.comment-item__date { font-size: 11px; color: var(--tt-3); margin-bottom: 6px; }
.comment-item__text { font-size: 13px; line-height: 1.6; color: var(--tt-2); }

/* ── Tags / Badges ────────────────────────────── */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.tag--quality { background: var(--accent-blue); color: #fff; }
.tag--new { background: var(--accent-green); color: #fff; }
.tag--hd { background: rgba(255,255,255,0.1); color: var(--tt-2); }

/* ── Breadcrumbs ──────────────────────────────── */
.breadcrumbs {
    display: flex; gap: 8px; align-items: center;
    font-size: 12px; color: var(--tt-3); margin-bottom: 16px;
    flex-wrap: wrap;
}
.breadcrumbs a { color: var(--tt-3); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span.sep { color: var(--tt-3); opacity: 0.4; }

/* ── Loading Skeleton ─────────────────────────── */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--bg-dark) 25%, var(--bg-accent) 50%, var(--bg-dark) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ── Scrollbar ────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darkest); }
::-webkit-scrollbar-thumb { background: var(--tt-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Mobile Menu Overlay ──────────────────────── */
.mobile-menu-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.7); display: none;
}
.mobile-menu-overlay.is-open { display: block; }
.mobile-menu {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
    background: var(--bg); z-index: 201; overflow-y: auto;
    padding: 20px; transform: translateX(-100%); transition: transform .3s;
}
.mobile-menu-overlay.is-open .mobile-menu { transform: translateX(0); }
.mobile-menu__close {
    width: 36px; height: 36px; background: none; padding: 0;
    color: var(--tt-3); font-size: 20px; margin-bottom: 16px; cursor: pointer;
}
