/* =========================================================
   PDF TOOLS (Split / Compress / Organize / Protect / Unlock)
   The page shell (upload box, buttons, result) comes from
   format_converter.css; this file adds what is specific to PDFs.
========================================================= */

.pdf-hub-more {
    margin-top: 28px;
    text-align: center;
    color: var(--gp-muted);
}

.pdf-hub-more a {
    font-weight: 700;
    color: var(--gp-blue-dark);
}

.pdf-file-card {
    display: flex;
    align-items: center;
    gap: 14px;

    margin: 0 0 18px;
    padding: 14px 16px;

    border: 1px solid var(--gp-border);
    border-radius: 14px;
    background: var(--gp-bg-soft);
}

.pdf-file-card[hidden] {
    display: none;
}

.pdf-file-icon {
    flex: none;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    border-radius: 10px;
    background: #d92d20;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.pdf-file-info {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pdf-file-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gp-navy);
}

.pdf-file-info span {
    font-size: 0.88rem;
    color: var(--gp-muted);
}

.pdf-file-remove {
    flex: none;

    width: 34px;
    height: 34px;

    border: 0;
    border-radius: 50%;
    background: #ffffff;

    font-size: 22px;
    line-height: 1;
    color: var(--gp-navy);

    cursor: pointer;
}

.pdf-file-remove:hover {
    background: var(--gp-bg-tint);
}

.pdf-options {
    margin: 0 0 18px;
    text-align: left;
}

.pdf-options[hidden] {
    display: none;
}

.pdf-options-title {
    margin: 0 0 14px;

    font-family: var(--gp-font-heading);
    font-size: 1.1rem;
    color: var(--gp-navy);
}

.pdf-options-meta {
    margin-left: 8px;

    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gp-muted);
}

.pdf-choices {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.pdf-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 13px 15px;

    border: 1px solid var(--gp-border-2);
    border-radius: 12px;
    background: #ffffff;

    cursor: pointer;
}

.pdf-choice:hover {
    border-color: var(--gp-blue);
}

.pdf-choice:has(input:checked) {
    border-color: var(--gp-blue);
    background: var(--gp-bg-tint);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.pdf-choice input {
    margin-top: 4px;
}

.pdf-choice strong {
    display: block;
    color: var(--gp-navy);
}

.pdf-choice small {
    display: block;
    margin-top: 2px;
    line-height: 1.5;
    color: var(--gp-muted);
}

.pdf-field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.pdf-field[hidden] {
    display: none;
}

.pdf-field label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gp-text-2);
}

.pdf-field input {
    padding: 12px 14px;

    border: 1px solid var(--gp-border-2);
    border-radius: 10px;

    font: inherit;
}

.pdf-field small {
    color: var(--gp-muted);
}

.pdf-checks {
    display: grid;
    gap: 10px;
    margin: 4px 0 14px;
}

.pdf-checks label {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    line-height: 1.5;
    color: var(--gp-text-2);
}

.pdf-checks input {
    margin-top: 4px;
}

.pdf-note {
    margin: 0 0 12px;

    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--gp-muted);
}

.pdf-note[hidden] {
    display: none;
}

.pdf-busy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 14px;
    color: var(--gp-text-2);
}

.pdf-busy[hidden] {
    display: none;
}

.pdf-spinner {
    width: 20px;
    height: 20px;

    border: 3px solid var(--gp-border-2);
    border-top-color: var(--gp-blue);
    border-radius: 50%;

    animation: pdf-spin 0.8s linear infinite;
}

@keyframes pdf-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .pdf-spinner { animation-duration: 3s; }
}

/* ---------- Organize ---------- */

.organize-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 14px;
}

.organize-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    padding: 10px 8px 8px;

    border: 1px solid var(--gp-border);
    border-radius: 12px;
    background: #ffffff;

    cursor: grab;
}

.organize-tile.dragging {
    opacity: 0.45;
}

.organize-tile.drop-target {
    border-color: var(--gp-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.organize-tile.removed {
    opacity: 0.45;
    background: var(--gp-bg-soft);
}

.organize-thumb {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 150px;

    overflow: hidden;
}

.organize-thumb img {
    max-width: 100%;
    max-height: 100%;

    border: 1px solid var(--gp-border);
    box-shadow: var(--gp-shadow);
    background: #ffffff;

    transition: transform 0.2s ease;
}

.organize-tile.removed .organize-thumb img {
    filter: grayscale(1);
}

.organize-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gp-text-2);
}

.organize-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.organize-btn {
    width: 28px;
    height: 28px;

    border: 1px solid var(--gp-border-2);
    border-radius: 8px;
    background: #ffffff;

    font-size: 13px;
    line-height: 1;
    color: var(--gp-navy);

    cursor: pointer;
}

.organize-btn:hover:not(:disabled) {
    border-color: var(--gp-blue);
    background: var(--gp-bg-tint);
}

.organize-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
