/* ==============================================================
   GOTOOL-PDF-PLATFORM Tools & Processing Styles (tools.css)
   ============================================================== */

/* Tool Header */
.tool-header-section {
    padding: 3rem 0 2rem;
    text-align: center;
    background: linear-gradient(180deg, var(--gray-100) 0%, var(--gray-50) 100%);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2.5rem;
}

.tool-header-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.tool-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.tool-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.tool-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.tool-meta-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.badge-tag.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Tool Runner Workspace */
.tool-workspace {
    max-width: 960px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.tool-card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

/* Dropzone */
.dropzone-container {
    padding: 2.5rem 1.5rem;
    margin: 1.5rem;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    background-color: var(--gray-50);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.dropzone-container:hover,
.dropzone-container.is-dragover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.dropzone-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.dropzone-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.dropzone-sub {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.dropzone-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Selected Files Queue */
.file-queue {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    background-color: #ffffff;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.queue-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.queue-count {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.file-list-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease;
}

.file-row:hover {
    border-color: var(--gray-300);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.file-icon {
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
}

.file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.file-size {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-file-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.125rem;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease;
}

.btn-file-remove:hover {
    color: var(--danger);
}

/* Tool Options Panel */
.tool-options-panel {
    padding: 1.5rem;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.options-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background-color: #ffffff;
    color: var(--gray-800);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group select:focus,
.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Tool Action Bar */
.tool-actions {
    padding: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background-color: #ffffff;
    border-top: 1px solid var(--gray-200);
}

.btn-process {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-process:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-process:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
}

/* Progress State */
.tool-progress-panel {
    padding: 3rem 1.5rem;
    text-align: center;
    display: none;
}

.spinner-wrapper {
    margin-bottom: 1.5rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-message {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.progress-bar-wrap {
    max-width: 400px;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: var(--radius-full);
    margin: 1rem auto;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

/* Result State */
.tool-result-panel {
    padding: 3rem 1.5rem;
    text-align: center;
    display: none;
}

.result-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #ecfdf5;
    color: var(--success);
    font-size: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.result-subtitle {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.result-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn-download {
    background-color: var(--success);
    color: #ffffff;
    font-weight: 600;
    padding: 0.875rem 2.25rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease;
}

.btn-download:hover {
    background-color: #059669;
    color: #ffffff;
}

.btn-reset {
    background-color: var(--gray-100);
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-reset:hover {
    background-color: var(--gray-200);
}

.result-retention-note {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Tool Features / Guide / FAQs */
.tool-details-section {
    max-width: 960px;
    margin: 0 auto 5rem;
    padding: 0 1.5rem;
}

.guide-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin: 2rem 0 4rem;
}

.guide-step-card {
    background-color: #ffffff;
    padding: 1.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    position: relative;
}

.guide-step-num {
    width: 36px;
    height: 36px;
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.guide-step-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.guide-step-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}
