.pdfhub-tool {
    max-width: 760px;
    margin: 24px auto 0;
}

.pdfhub-tool-form,
.pdfhub-tool-form * {
    box-sizing: border-box;
}

.pdfhub-tool-form {
    padding: 32px;
    border: 1px solid #dce3ec;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.pdfhub-tool-description {
    margin: 0 0 24px;
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.6;
}

.pdfhub-tool-notice {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    background: #f7f9fc;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pdfhub-tool-field {
    margin-bottom: 20px;
}

.pdfhub-tool-field > label:not(.pdfhub-tool-dropzone) {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-weight: 600;
}

.pdfhub-tool-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.pdfhub-tool-dropzone {
    display: flex;
    min-height: 230px;
    padding: 36px 24px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #b8c6d9;
    border-radius: 14px;
    background: #f7f9fc;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.pdfhub-tool-dropzone:hover,
.pdfhub-tool-dropzone.is-dragover {
    border-color: #2563eb;
    background: #f1f5ff;
}

.pdfhub-tool-dropzone.is-dragover {
    transform: translateY(-2px);
}

.pdfhub-tool-dropzone:focus-visible,
.pdfhub-tool-file-input:focus-visible + .pdfhub-tool-dropzone {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 3px;
}

.pdfhub-tool-drop-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.pdfhub-tool-drop-title {
    color: #111827;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.35;
}

.pdfhub-tool-drop-or {
    margin: 8px 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.pdfhub-tool-file-button {
    display: inline-flex;
    min-height: 44px;
    padding: 10px 20px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    line-height: 1;
}

.pdfhub-tool-file-hint {
    margin-top: 14px;
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.45;
}

.pdfhub-tool-file-list {
    margin-top: 12px;
    padding: 11px 13px;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    background: #ffffff;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.pdfhub-tool-file-list.has-files {
    border-color: #bfd2ff;
    background: #f5f8ff;
    color: #111827;
}

.pdfhub-tool-field input[type="text"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    font: inherit;
}

.pdfhub-tool-field input[type="text"]:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, 0.15);
}

.pdfhub-tool-button,
.pdfhub-tool-download {
    display: inline-flex;
    min-height: 46px;
    padding: 12px 22px;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 8px;
    background: #2563eb !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.pdfhub-tool-button:hover,
.pdfhub-tool-download:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.pdfhub-tool-button:focus-visible,
.pdfhub-tool-download:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 3px;
}

.pdfhub-tool-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.pdfhub-tool-status {
    margin-top: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.pdfhub-tool-status:empty,
.pdfhub-tool-result:empty {
    display: none;
}

.pdfhub-tool-status-error {
    color: #b91c1c;
}

.pdfhub-tool-status-success {
    color: #166534;
}

.pdfhub-tool-status-loading {
    color: #374151;
}

.pdfhub-tool-result {
    margin-top: 14px;
}

@media (max-width: 640px) {
    .pdfhub-tool {
        margin-top: 16px;
    }

    .pdfhub-tool-form {
        padding: 20px;
        border-radius: 14px;
    }

    .pdfhub-tool-dropzone {
        min-height: 210px;
        padding: 28px 18px;
    }

    .pdfhub-tool-button,
    .pdfhub-tool-download {
        width: 100%;
    }
}
