/* ==========================================================
   Generator Template Poster Sekolah
   File: assets/css/template-poster.css
   Semua class memakai prefix "tp-" agar tidak bentrok dengan halaman lain.
   ========================================================== */

.tp-wrap {
    max-width: 1050px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

/* ---------- Header halaman ---------- */
.tp-hero {
    margin-bottom: 2rem;
    text-align: center;
}
.tp-hero__title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}
.tp-hero__desc {
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* ---------- Kartu utama ---------- */
.tp-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 3rem;
}
.tp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ---------- Form ---------- */
.tp-panel__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tp-field {
    margin-bottom: 1.25rem;
}
.tp-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.4rem;
}
.tp-input,
.tp-textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
    background: #f8fafc;
    color: #1e293b;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.tp-input--bold {
    font-weight: 600;
}
.tp-textarea {
    resize: vertical;
    min-height: 90px;
}
.tp-input:focus,
.tp-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    background: #ffffff;
}

.tp-colors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.tp-color-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tp-color-input {
    width: 45px;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
}
.tp-color-hint {
    font-size: 0.8rem;
    color: #64748b;
}

/* ---------- Unggah gambar latar ---------- */
.tp-upload {
    margin-bottom: 1.75rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 1.25rem;
}
.tp-upload__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.tp-hidden {
    display: none !important;
}
.tp-btn-file {
    background: #e2e8f0;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}
.tp-btn-file:hover {
    background: #cbd5e1;
}
.tp-file-name {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    word-break: break-all;
}
.tp-info {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
}
.tp-info--ok {
    color: #16a34a;
    font-weight: 600;
}
.tp-info--error {
    color: #dc2626;
    font-weight: 600;
}
.tp-btn-remove {
    margin-top: 0.6rem;
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 0.35rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
}
.tp-btn-remove:hover {
    background: #dc2626;
}

/* ---------- Tombol aksi (Unduh & Reset berdampingan) ---------- */
.tp-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.tp-btn {
    border-radius: 10px;
    padding: 0.85rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
}
.tp-btn--download {
    flex: 2;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
    transition: transform 0.1s, box-shadow 0.2s;
}
.tp-btn--download:hover {
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}
.tp-btn--download:active {
    transform: scale(0.98);
}
.tp-btn--reset {
    flex: 1;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    transition: background 0.2s;
}
.tp-btn--reset:hover {
    background: #e2e8f0;
}

/* ---------- Pratinjau ---------- */
.tp-preview {
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
}
.tp-preview__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tp-canvas {
    width: 100%;
    height: auto;
    max-width: 420px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

/* ---------- Artikel panduan ---------- */
.tp-article {
    margin-top: 2rem;
    padding-top: 3rem;
    border-top: 1px solid #e2e8f0;
}
.tp-article__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1rem;
}
.tp-article__body {
    color: #1e293b;
    line-height: 1.75;
    font-size: 1rem;
    text-align: justify;
}
.tp-article__body > * + * {
    margin-top: 1rem;
}
.tp-article__body h3,
.tp-article__body h4 {
    font-weight: 700;
    color: #0f172a;
}
.tp-article__body ul,
.tp-article__body ol {
    padding-left: 1.5rem;
}
.tp-article__body ul {
    list-style: disc;
}
.tp-article__body ol {
    list-style: decimal;
}

/* ---------- Responsif ---------- */
@media (max-width: 768px) {
    .tp-wrap {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }
    .tp-hero__title {
        font-size: 1.75rem;
    }
    .tp-card {
        padding: 1.25rem;
    }
    .tp-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .tp-preview {
        position: relative;
        top: 0;
    }
    .tp-article__body {
        text-align: left;
        font-size: 0.95rem;
    }
}