/* WP PDF Toolkit — mobile-first, fully responsive */

.wppt-wrap {
    --wppt-primary: #e5322d;
    --wppt-primary-dark: #c3241f;
    --wppt-text: #2b2b2b;
    --wppt-muted: #6b7280;
    --wppt-bg-card: #ffffff;
    --wppt-border: #e5e7eb;
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    color: var(--wppt-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}
.wppt-wrap *, .wppt-wrap *::before, .wppt-wrap *::after { box-sizing: inherit; }

.wppt-hero { text-align: center; padding: 32px 8px 24px; }
.wppt-hero h1 { font-size: 1.6rem; margin: 0 0 8px; line-height: 1.25; }
.wppt-hero p { color: var(--wppt-muted); font-size: 1rem; margin: 0; }

/* Grid: 2 columns on phones, scaling up */
.wppt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}
@media (min-width: 480px) {
    .wppt-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
    .wppt-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .wppt-hero h1 { font-size: 2.2rem; }
}
@media (min-width: 1024px) {
    .wppt-grid { grid-template-columns: repeat(6, 1fr); }
}

.wppt-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: var(--wppt-text);
    background: var(--wppt-bg-card);
    border: 1px solid var(--wppt-border);
    border-radius: 12px;
    padding: 18px 8px;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    min-height: 110px;
}
.wppt-card:hover, .wppt-card:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    border-color: var(--wppt-primary);
}
.wppt-card-icon { font-size: 1.8rem; }
.wppt-card-label { font-size: .85rem; font-weight: 600; line-height: 1.3; }

/* Tool page */
.wppt-tool-page h1 { font-size: 1.5rem; margin-bottom: 16px; }
.wppt-back { margin-bottom: 12px; }
.wppt-back a { color: var(--wppt-primary); text-decoration: none; font-weight: 600; }

.wppt-notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .95rem; }
.wppt-notice-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.wppt-dropzone {
    border: 2px dashed var(--wppt-border);
    border-radius: 14px;
    padding: 40px 16px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color .15s ease, background .15s ease;
    background: #fafafa;
}
.wppt-dropzone.is-dragover { border-color: var(--wppt-primary); background: #fff5f5; }
.wppt-dropzone-icon { font-size: 2.4rem; margin-bottom: 8px; }
.wppt-dropzone p { margin: 0; color: var(--wppt-muted); }
.wppt-file-input {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}

.wppt-file-list { list-style: none; margin: 12px 0 0; padding: 0; }
.wppt-file-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; background: #f3f4f6; border-radius: 8px; margin-bottom: 6px;
    font-size: .9rem; word-break: break-all;
}

.wppt-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
}
@media (min-width: 600px) {
    .wppt-options { grid-template-columns: repeat(2, 1fr); }
}
.wppt-field { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.wppt-field span { font-weight: 600; color: var(--wppt-muted); }
.wppt-field input, .wppt-field select {
    padding: 10px 12px; border: 1px solid var(--wppt-border); border-radius: 8px; font-size: 1rem; width: 100%;
}

.wppt-submit {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 14px 20px;
    background: var(--wppt-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease;
}
.wppt-submit:hover:not(:disabled) { background: var(--wppt-primary-dark); }
.wppt-submit:disabled { background: #d1d5db; cursor: not-allowed; }

@media (min-width: 600px) {
    .wppt-submit { width: auto; min-width: 220px; }
}

.wppt-progress { margin-top: 20px; }
.wppt-progress-bar {
    height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; position: relative;
}
.wppt-progress-bar::after {
    content: ""; position: absolute; inset: 0; width: 40%;
    background: var(--wppt-primary); border-radius: 4px;
    animation: wppt-indeterminate 1.1s infinite ease-in-out;
}
@keyframes wppt-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}
.wppt-progress-text { color: var(--wppt-muted); font-size: .9rem; margin-top: 8px; }

.wppt-result {
    margin-top: 20px; padding: 20px; background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 10px; text-align: center;
}
.wppt-download-btn {
    display: inline-block; margin-top: 10px; padding: 12px 24px;
    background: var(--wppt-primary); color: #fff; text-decoration: none;
    border-radius: 8px; font-weight: 700;
}
.wppt-download-btn:hover { background: var(--wppt-primary-dark); }

.wppt-error {
    margin-top: 16px; padding: 12px 16px; background: #fef2f2; color: #991b1b;
    border: 1px solid #fecaca; border-radius: 8px; font-size: .95rem;
}
