/*
 * Công cụ tải thumbnail YouTube.
 *
 * Mọi biến màu khai ngay trên .szt và đều có giá trị dự phòng, nên đặt vào
 * chủ đề nào cũng hiện đúng: chủ đề có khai màu thương hiệu thì ăn theo, không
 * có thì dùng màu mặc định ở đây.
 */

.szt {
    --szt-ink: var(--ink, #0d1a2d);
    --szt-muted: var(--muted, #6a7f9c);
    --szt-line: var(--line, #dbe5f1);
    --szt-paper: var(--paper, #fff);
    --szt-nen: var(--surface, #f1f6fc);
    --szt-chinh: var(--brand-primary, #1b4f9c);
    --szt-xau: #b32d2e;

    max-width: 980px;
    margin: 0 auto;
    color: var(--szt-ink);
    font-family: inherit;
}

.szt__tieu-de { margin: 0 0 14px; font-size: 26px; line-height: 1.25; }

/*
 * Khối công cụ: đây là trang công cụ, không phải bài viết. Ô nhập phải là thứ
 * đập vào mắt trước nhất.
 *
 * Nền đỏ vì trang của website thường là nền trắng — khối trắng đặt lên nền
 * trắng thì chẳng nổi hơn đoạn văn bên cạnh là bao, dù có viền có bóng. Đỏ còn
 * là màu YouTube, nhìn một cái là biết công cụ làm việc gì.
 */
.szt__hop {
    padding: 30px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #e31b16, #b2110d);
    color: #fff;
    box-shadow: 0 16px 36px rgba(178, 17, 13, .26);
}

.szt__hop .szt__mo-ta { color: rgba(255, 255, 255, .92); }
/* Chữ nhỏ trên nền đỏ phải sáng hẳn, mờ một chút là tụt dưới ngưỡng đọc được. */
.szt__hop .szt__goi-y { color: rgba(255, 255, 255, .92); }

/* Ô nhập trắng trên nền đỏ: chỗ gõ phải là chỗ sáng nhất trong khối. */
.szt__hop .szt__nhap {
    border-color: transparent;
    background: #fff;
    color: #17202c;
}

.szt__hop .szt__nhap::placeholder { color: #8a94a3; }
.szt__hop .szt__nhap:focus { outline-color: #fff; border-color: #fff; background: #fff; }

.szt__hop .szt__nut {
    border-color: #fff;
    background: #fff;
    color: #c2140f;
}

.szt__hop .szt__nut:hover { filter: none; background: #fff6f6; color: #a1100c; }

/* Thích kiểu nhẹ nhàng thì [tai_thumbnail_youtube nen="trang"]. */
.szt__hop--trang {
    border: 1px solid var(--szt-line);
    background: var(--szt-paper);
    color: inherit;
    box-shadow: 0 10px 30px rgba(13, 26, 45, .07);
}

.szt__hop--trang .szt__mo-ta { color: var(--szt-muted); }
.szt__hop--trang .szt__goi-y { color: var(--szt-muted); }
.szt__hop--trang .szt__nhap { border-color: var(--szt-line); background: var(--szt-nen); color: inherit; }
.szt__hop--trang .szt__nhap:focus { outline-color: var(--szt-chinh); border-color: var(--szt-chinh); }
.szt__hop--trang .szt__nut { border-color: var(--szt-chinh); background: var(--szt-chinh); color: #fff; }
.szt__hop--trang .szt__nut:hover { filter: brightness(1.1); background: var(--szt-chinh); color: #fff; }

.szt__mo-ta { margin: 0 0 16px; font-size: 15.5px; color: var(--szt-muted); }

.szt__o {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.szt__nhap {
    flex: 1 1 280px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--szt-line);
    border-radius: 12px;
    background: var(--szt-nen);
    color: inherit;
    font-size: 16px;
    font-family: inherit;
}

.szt__nhap:focus {
    outline: 2px solid var(--szt-chinh);
    outline-offset: 1px;
    border-color: var(--szt-chinh);
}

.szt__nhap:focus { background: var(--szt-paper); }

.szt__nut {
    display: inline-block;
    padding: 16px 30px;
    border: 1px solid var(--szt-chinh);
    border-radius: 12px;
    background: var(--szt-chinh);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.szt__nut:hover { filter: brightness(1.1); color: #fff; }
.szt__nut[disabled] { opacity: .6; cursor: default; }

.szt__nut { font-size: 16px; }
.szt__nut--nho { padding: 8px 14px; font-size: 13.5px; border-radius: 8px; }

.szt__nut--vien {
    background: transparent;
    color: var(--szt-chinh);
}

.szt__nut--vien:hover { background: var(--szt-nen); color: var(--szt-chinh); }

.szt__goi-y { margin: 12px 0 0; font-size: 13px; color: var(--szt-muted); }

.szt__bao { margin: 16px 0 0; font-size: 14px; color: var(--szt-muted); }
.szt__bao--xau { color: var(--szt-xau); }

.szt__dau { margin: 24px 0 12px; font-size: 14px; color: var(--szt-muted); }

.szt__luoi {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.szt__the {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 1px solid var(--szt-line);
    border-radius: 12px;
    background: var(--szt-paper);
}

/* Bấm vào ảnh là mở ảnh gốc đúng cỡ đó ở tab mới. */
.szt__xem {
    position: relative;
    display: block;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}

.szt__hinh {
    display: block;
    width: 100%;
    height: auto;
    background: var(--szt-nen);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .25s ease;
}

.szt__xem-nhan {
    position: absolute;
    inset: auto 0 0 0;
    padding: 18px 10px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .72));
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    opacity: 0;
    transition: opacity .2s ease;
}

.szt__xem:hover .szt__hinh,
.szt__xem:focus-visible .szt__hinh { transform: scale(1.04); }

.szt__xem:hover .szt__xem-nhan,
.szt__xem:focus-visible .szt__xem-nhan { opacity: 1; }

/* Máy cảm ứng không có chuột để rê, nên hiện sẵn cho biết bấm được. */
@media (hover: none) {
    .szt__xem-nhan { opacity: 1; }
}

.szt__the-ten { margin: 0; font-size: 15px; font-weight: 600; }
.szt__the-so { margin: 2px 0 12px; font-size: 13px; color: var(--szt-muted); }

.szt__the-nut {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

@media (max-width: 600px) {
    .szt__tieu-de { font-size: 22px; }
    .szt__hop { padding: 20px; border-radius: 14px; }
    .szt__nut { flex: 1 1 100%; text-align: center; }
    .szt__nut--nho { flex: 0 0 auto; }
}
