/* ========== PDF to Excel Tool Styles ========== */
:root {
    --primary: #2c7da0;
    --primary-dark: #1f5068;
    --primary-light: #61a5c2;
    --secondary: #344e5c;
    --success: #2a9d8f;
    --error: #e76f51;
    --gray-bg: #f8f9fa;
    --border: #e2e8f0;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --radius: 1rem;
}



/* Error & Success Messages */
.error-message,
.success-message {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background-color: #fee2e2;
    color: var(--error);
    border-left: 4px solid var(--error);
}

.success-message {
    background-color: #e0f2fe;
    color: var(--success);
    border-left: 4px solid var(--success);
}

/* Editor Layout (hidden at start) */
.editor-layout.hidden {
    display: none;
}


.tool-settings .options-section {
    max-width: 400px;
    margin: 2rem auto;
    font-family: 'Segoe UI', 'Roboto', 'Noto Sans', system-ui, sans-serif;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

/* File Info Box */
.file-box {
    background-color: #f1f5f9;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.file-name {
    font-weight: 600;
    color: #0f172a;
    word-break: break-all;
    font-size: 0.9rem;
}

.file-size {
    font-size: 0.8rem;
    color: #475569;
    background: #e2e8f0;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
}

.remove-file {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.remove-file:hover {
    color: var(--error);
}

/* Settings Row */
.settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.75rem;
}

.setting-item {
    flex: 1;
    min-width: 160px;
}

.setting-item label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    margin-bottom: 0.25rem;
}

.setting-item input,
.setting-item select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: white;
    transition: 0.2s;
}

.setting-item input:focus,
.setting-item select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44,125,160,0.1);
}

/* Progress Bar */
.progress-container {
    margin: 1rem 0;
    background-color: #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    height: 2rem;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--primary-light);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    text-shadow: 0 0 2px white;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .tool-wrapper {
        margin: 1rem;
        padding: 1rem;
    }
    .settings-row {
        flex-direction: column;
        gap: 1rem;
    }
    .action-buttons {
        justify-content: center;
    }
    .file-row {
        flex-direction: column;
        align-items: flex-start;
    }
}