.thz-tool-wrapper{
    width:100%;
    max-width:900px;
    margin:60px auto;
    padding:20px;
    box-sizing:border-box;
}
.thz-tool-card{
    background:#ffffff;
    border-radius:16px;
    padding:40px;
    box-shadow:0 10px 30px rgba(0,0,0,0.08);
}
.thz-tool-title{
    font-size:38px;
    font-weight:700;
    margin-bottom:10px;
    color:#111827;
    line-height:1.2;
}
.thz-tool-description{
    font-size:16px;
    color:#6b7280;
    margin-bottom:30px;
}
.thz-upload-form{
    width:100%;
}
.thz-upload-box{
    border:2px dashed #d1d5db;
    border-radius:14px;
    padding:50px 20px;
    text-align:center;
    margin-bottom:25px;
    position:relative;
    transition:0.3s ease;
    background:#f9fafb;
}
.thz-upload-box:hover{
    border-color:#2563eb;
    background:#eff6ff;
}
.thz-upload-box input[type="file"]{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    opacity:0;
    cursor:pointer;
}
.thz-upload-box label{
    display:inline-block;
    font-size:18px;
    font-weight:600;
    color:#2563eb;
    cursor:pointer;
}
.thz-quality-field{
    margin-bottom:25px;
}
.thz-quality-field label{
    display:block;
    margin-bottom:10px;
    font-weight:600;
    color:#111827;
}
.thz-quality-field select{
    width:100%;
    height:50px;
    border:1px solid #d1d5db;
    border-radius:10px;
    padding:0 15px;
    font-size:15px;
    background:#fff;
}
.thz-submit-btn{
    width:100%;
    height:55px;
    border:none;
    border-radius:12px;
    background:#2563eb;
    color:#fff;
    font-size:17px;
    font-weight:700;
    cursor:pointer;
    transition:0.3s ease;
}
.thz-submit-btn:hover{
    background:#1d4ed8;
}
.thz-progress{
    width:100%;
    height:10px;
    background:#e5e7eb;
    border-radius:50px;
    margin-top:25px;
    overflow:hidden;
}
.thz-progress-bar{
    width:0%;
    height:100%;
    background:#2563eb;
    transition:0.3s ease;
}
.thz-result{
    margin-top:25px;
}
.thz-download-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:220px;
    height:52px;
    padding:0 25px;
    border-radius:12px;
    background:#16a34a;
    color:#fff;
    font-weight:700;
    text-decoration:none;
    transition:0.3s ease;
}
.thz-download-btn:hover{
    background:#15803d;
    color:#fff;
}
.thz-error{
    background:#fee2e2;
    color:#b91c1c;
    padding:15px;
    border-radius:10px;
    font-size:15px;
    font-weight:600;
}
.thz-selected-files{
    margin-bottom:20px;
}
.thz-file-item{
    background:#f3f4f6;
    border-radius:8px;
    padding:12px 15px;
    margin-bottom:10px;
    font-size:14px;
    color:#111827;
    word-break:break-word;
}

/* =====================
   Admin Bar Fix
   ===================== */
.admin-bar .thz-tool-wrapper {
    margin-top: 32px;
}

/* Nav dropdown fix for admin bar */
.admin-bar .site-navigation .sub-menu,
.admin-bar nav .sub-menu,
.admin-bar .nav-menu .sub-menu {
    top: 100% !important;
    margin-top: 0 !important;
}

/* Prevent dropdown from going behind admin bar */
.admin-bar ul.sub-menu {
    z-index: 99999 !important;
    position: absolute !important;
}

@media(max-width:768px){
    .thz-tool-card{
        padding:25px;
    }
    .thz-tool-title{
        font-size:30px;
    }
    .thz-upload-box{
        padding:35px 15px;
    }
    .thz-submit-btn{
        font-size:16px;
    }
    /* Mobile admin bar fix */
    .admin-bar .thz-tool-wrapper {
        margin-top: 46px;
    }
}

/* =====================
   PDF Tools colourful grid — [thz_pdf_tools]
   Each card carries its own two-colour gradient (set inline via
   --c1/--c2 custom props) so every tool reads as visually distinct.
   ===================== */
.thzg-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
    gap:18px;
    max-width:1100px;
    margin:40px auto;
    padding:0 20px;
    box-sizing:border-box;
}
.thzg-card{
    position:relative;
    display:block;
    overflow:hidden;
    background:#fff;
    border:1px solid #e9e9f2;
    border-radius:16px;
    padding:22px 18px 26px;
    text-decoration:none;
    color:#171522;
    transition:transform .18s ease, box-shadow .18s ease;
}
.thzg-card::after{
    content:"";
    position:absolute; top:0; left:0; right:0; height:4px;
    background:linear-gradient(90deg, var(--c1), var(--c2));
}
.thzg-card:hover{
    transform:translateY(-3px);
    box-shadow:0 14px 30px -12px var(--c1);
}
.thzg-chip{
    display:inline-flex; align-items:center; justify-content:center;
    min-width:50px; height:28px; padding:0 10px;
    border-radius:8px;
    font-size:12px; font-weight:800; letter-spacing:.03em;
    color:#fff;
    background:linear-gradient(135deg, var(--c1), var(--c2));
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}
.thzg-name{
    margin:16px 0 0;
    font-size:16px;
    font-weight:700;
    line-height:1.3;
    color:#171522;
}
@media(max-width:480px){
    .thzg-grid{ grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:12px; }
    .thzg-card{ padding:16px 14px 18px; }
}