/* =========================================================
   PDF MAGIC — COMPLETE UNIFIED TOOLS & SYSTEM CSS
   File: /css/pdfmagic-tools-generic.css
   ========================================================= */

:root {
    --pm-primary: #6d4aff;
    --pm-primary-hover: #5534dc;
    --pm-soft: #f1edff;
    --pm-text: #19192c;
    --pm-muted: #666779;
    --pm-line: #e8e7ef;
    --pm-success: #10b981;
    --pm-success-hover: #059669;
    --pm-danger: #fee2e2;
    --pm-danger-text: #dc2626;
}

/* ---------- 1. Shell e Breadcrumbs ---------- */
.pm-tool-page {
    padding: 30px 0 60px;
    background: linear-gradient(180deg, #fff 0%, #faf9ff 50%, #fff 100%);
}

.pm-tool-container,
.pm-container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.pm-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--pm-muted);
}

.pm-breadcrumbs a {
    color: var(--pm-muted) !important;
    text-decoration: none !important;
    transition: color 0.18s ease;
}

.pm-breadcrumbs a:hover {
    color: var(--pm-primary) !important;
}

.pm-breadcrumbs .sep {
    color: #c4c3d0;
    font-weight: 400;
}

.pm-breadcrumbs .current {
    color: var(--pm-text);
    font-weight: 800;
}

.pm-tool-shell {
    background: #fff;
    border: 1px solid var(--pm-line);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 10px 30px rgba(40, 34, 80, 0.05);
}

/* ---------- 2. Header & Dropzone ---------- */
.pm-tool-header {
    text-align: center;
    margin-bottom: 32px;
}

.pm-eyebrow,
.pm-tool-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--pm-soft);
    color: var(--pm-primary);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .055em;
    border: 1px solid #ddd6ff;
}

.pm-tool-header h1 {
    font-size: clamp(32px, 4.5vw, 48px);
    color: var(--pm-text);
    margin: 16px 0 10px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.pm-tool-header p {
    color: var(--pm-muted);
    font-size: 16px;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.pm-upload-area {
    border: 2px dashed #c4b5fd;
    background: var(--pm-soft);
    border-radius: 20px;
    padding: 48px 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.pm-upload-area:hover,
.pm-upload-area.pm-dragover {
    border-color: var(--pm-primary);
    background: #ebe5ff;
}

.pm-upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #fff;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: var(--pm-primary);
    box-shadow: 0 4px 12px rgba(109, 74, 255, 0.1);
}

.pm-upload-button,
.pm-btn-select {
    display: inline-block;
    padding: 12px 28px;
    background: var(--pm-primary);
    color: #fff !important;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 14px rgba(109, 74, 255, 0.3);
    transition: background 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.pm-upload-button:hover,
.pm-btn-select:hover {
    background: var(--pm-primary-hover);
    transform: translateY(-2px);
}

.pm-file-name {
    margin-top: 14px;
    font-weight: 800;
    color: var(--pm-primary);
    word-break: break-word;
    font-size: 15px;
}

/* ---------- 3. Opzioni & Form ---------- */
.pm-tool-options {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--pm-line);
    border-radius: 18px;
    background: #fff;
}

.pm-options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 12px;
}

.pm-option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pm-option-label {
    font-weight: 800;
    font-size: 14px;
    color: var(--pm-text);
}

.pm-control {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid var(--pm-line);
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pm-control:focus {
    border-color: var(--pm-primary);
    box-shadow: 0 0 0 3px rgba(109, 74, 255, .10);
}

.pm-tool-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.pm-tool-button {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease;
}

.pm-tool-button--primary {
    background: var(--pm-primary);
    color: #fff !important;
}

.pm-tool-button--primary:hover {
    background: var(--pm-primary-hover);
}

.pm-tool-button--danger {
    background: var(--pm-danger);
    color: var(--pm-danger-text) !important;
    max-width: 180px;
}

/* ---------- 4. CONTENITORE VIOLA: "Come funziona PDF Magic" (Foto 2) ---------- */
.pm-purple-banner {
    background: linear-gradient(135deg, #7c58ff 0%, #6d4aff 100%);
    border-radius: 0;
    padding: 60px 0;
    color: #fff;
    margin: 40px 0;
}

.pm-purple-banner h2 {
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 32px 0;
}

.pm-purple-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.pm-purple-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 32px 28px;
}

.pm-purple-card .num {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 16px;
}

.pm-purple-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px 0;
}

.pm-purple-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
}

/* ---------- 5. CONTENITORE LILLA: "Come proteggere un PDF" (Foto 1) ---------- */
.pm-how-box {
    background: #f7f5ff;
    border: 1px solid #e8e2ff;
    border-radius: 28px;
    padding: 48px;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 40px;
    margin: 50px 0;
}

.pm-how-box-left h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--pm-text);
    line-height: 1.2;
    margin: 16px 0 0;
}

.pm-how-box-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pm-how-step-item {
    background: #fff;
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(109, 74, 255, 0.03);
}

.pm-how-step-num {
    width: 36px;
    height: 36px;
    background: var(--pm-primary);
    color: #fff;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}

.pm-how-step-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--pm-text);
}

/* ---------- 6. SEZIONE FAQ (Foto 3) ---------- */
.pm-faq-section {
    display: grid;
    grid-template-columns: 0.6fr 1.4fr;
    gap: 48px;
    margin: 60px 0;
}

.pm-faq-section h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--pm-text);
    margin: 12px 0 0;
}

.pm-faq-list details {
    border-bottom: 1px solid var(--pm-line);
    padding: 20px 0;
}

.pm-faq-list summary {
    font-size: 16px;
    font-weight: 800;
    color: var(--pm-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pm-faq-list summary::-webkit-details-marker {
    display: none;
}

.pm-faq-list summary::after {
    content: "+";
    font-size: 22px;
    color: var(--pm-primary);
    font-weight: 400;
}

.pm-faq-list details[open] summary::after {
    content: "−";
}

.pm-faq-list p {
    margin: 12px 0 0;
    color: var(--pm-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ---------- 7. Loader & Toast ---------- */
.pm-status {
    display: none;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 16px;
}

.pm-status.pm-error { display: block; background: #fff0f0; color: #b42318; border: 1px solid #fecdca; }
.pm-status.pm-success { display: block; background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }

.pm-loader {
    display: none;
    text-align: center;
    padding: 20px;
    font-weight: 800;
    color: var(--pm-primary);
}

.pm-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #ddd5ff;
    border-top-color: var(--pm-primary);
    border-radius: 50%;
    animation: pmSpin 0.7s linear infinite;
}

@keyframes pmSpin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .pm-purple-grid { grid-template-columns: 1fr; }
    .pm-how-box, .pm-faq-section { grid-template-columns: 1fr; gap: 24px; }
    .pm-how-box { padding: 32px 24px; }
    .pm-options-grid { grid-template-columns: 1fr; }
}
/* Card informazioni con icona accanto al titolo */
.pm-tool-info {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--pm-line);
    border-radius: 20px;
    background: #fff;
}

/* Header interno della card: icona + titolo affiancati */
.pm-tool-info-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.pm-tool-info-header .pm-tool-info__icon {
    margin-bottom: 0; /* Rimuove il margine inferiore */
    flex-shrink: 0;
}

.pm-tool-info-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--pm-text);
}