/* PDF Merge Tool - Editor Styles */

.wp-block-pdf-merge-tool {
    all: initial;
    display: block;
}

.pdf-merge-tool-wrapper {
    all: initial;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    background: transparent;
}

/* Container */
.pdf-merge-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Header */
.pdf-merge-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.pdf-merge-header h2 {
    all: initial;
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pdf-merge-header p {
    all: initial;
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    font-family: inherit;
}

/* Dropzone */
.pdf-merge-dropzone {
    all: initial;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    margin-bottom: 24px;
    padding: 32px;
    background: #fff;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdf-merge-dropzone:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.pdf-merge-dropzone.active {
    all: initial;
    display: flex;
    border-color: #3b82f6;
    background: #eff6ff;
    border: 2px dashed #3b82f6;
}

.pdf-merge-dropzone-content {
    text-align: center;
    width: 100%;
}

.pdf-merge-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.pdf-merge-dropzone h3 {
    all: initial;
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1f2937;
    font-family: inherit;
}

.pdf-merge-dropzone p {
    all: initial;
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 8px 0;
    font-family: inherit;
}

.pdf-merge-dropzone strong {
    all: initial;
    display: inline;
    font-weight: 600;
    color: #3b82f6;
}

.pdf-merge-dropzone small {
    all: initial;
    display: block;
    font-size: 12px;
    color: #9ca3af;
    font-family: inherit;
}

/* Files Section */
.pdf-merge-files-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.pdf-merge-files-section h3 {
    all: initial;
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1f2937;
    font-family: inherit;
}

.pdf-merge-info {
    all: initial;
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 16px 0;
    font-family: inherit;
}

.pdf-merge-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pdf-merge-file-item {
    all: initial;
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: move;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pdf-merge-file-item:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.pdf-merge-file-order {
    all: initial;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: #3b82f6;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
    font-family: inherit;
}

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

.pdf-merge-file-name {
    all: initial;
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
    font-family: inherit;
}

.pdf-merge-file-size {
    all: initial;
    display: block;
    font-size: 12px;
    color: #9ca3af;
    font-family: inherit;
}

.pdf-merge-file-remove {
    all: initial;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-left: 12px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.pdf-merge-file-remove:hover:not(:disabled) {
    background: #fecaca;
    color: #b91c1c;
}

.pdf-merge-file-remove:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Settings */
.pdf-merge-settings {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.pdf-merge-settings h3 {
    all: initial;
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #1f2937;
    font-family: inherit;
}

.pdf-merge-settings input[type="text"] {
    width: 100% !important;
    padding: 8px 12px !important;
    margin-bottom: 16px;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: inherit !important;
}

.pdf-merge-options {
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.pdf-merge-options label {
    all: initial;
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #1f2937;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 8px;
}

.pdf-merge-options label:last-child {
    margin-bottom: 0;
}

.pdf-merge-options input[type="checkbox"] {
    all: initial;
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
}

/* Actions */
.pdf-merge-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.pdf-merge-btn-merge {
    flex: 1;
    padding: 12px 20px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    font-size: 14px !important;
}

.pdf-merge-btn-merge:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.pdf-merge-btn-merge:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.pdf-merge-btn-clear {
    padding: 12px 20px !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    font-size: 14px !important;
}

.pdf-merge-btn-clear:hover:not(:disabled) {
    background: #e5e7eb !important;
    border-color: #9ca3af !important;
}

/* Empty State */
.pdf-merge-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
}

/* Loading State */
.pdf-merge-loading {
    text-align: center;
    padding: 40px 20px;
}

.pdf-merge-loading > span {
    margin-bottom: 16px;
}

.pdf-merge-loading p {
    all: initial;
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-top: 16px;
    font-family: inherit;
}

/* Alerts */
.components-notice {
    margin-bottom: 20px !important;
    border-radius: 6px !important;
}

.pdf-merge-download-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
    .pdf-merge-container {
        padding: 16px;
    }

    .pdf-merge-dropzone {
        padding: 20px;
        min-height: 150px;
    }

    .pdf-merge-actions {
        flex-direction: column;
    }

    .pdf-merge-header h2 {
        font-size: 24px;
    }
}
