/* =====================================================
   TXT to PDF Tool Specific Styles
   ===================================================== */

/* Status Message */
.status-message {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.status-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.status-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Content Textarea */
.content-textarea {
    width: 100%;
    min-height: 400px;
    padding: 20px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    font-family: 'Consolas', 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    margin: 20px 0;
    transition: all 0.3s ease;
    background: var(--bg-light, #f9fafb);
    color: var(--text, #111827);
}

.content-textarea:focus {
    outline: none;
    border-color: var(--primary, #00008B);
    box-shadow: 0 0 0 3px rgba(0, 0, 139, 0.1);
    background: white;
}

/* File Box */
.file-box {
    margin-top: 20px;
    padding: 16px 20px;
    background: #FAFAFA;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
}

.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.file-icon {
    font-size: 1.5rem;
    color: var(--primary, #00008B);
}

.file-name {
    font-weight: 600;
    color: #111827;
    flex: 1;
    word-break: break-word;
}

.file-size,
.file-chars {
    font-size: 13px;
    color: #6b7280;
}

.remove-file {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #FEE2E2;
    border: none;
    cursor: pointer;
    color: #DC2626;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #FECACA;
    transform: scale(1.05);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 40px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-buttons .btn-primary {
    background: var(--primary, #00008B);
    color: white;
    border: none;
}

.action-buttons .btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
}

.action-buttons .btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.action-buttons .btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* PDF Preview Section */
.pdf-preview-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-light, #f9fafb);
    border-radius: 20px;
    border: 1px solid var(--border, #e5e7eb);
    animation: fadeInUp 0.4s ease;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    flex-wrap: wrap;
    gap: 15px;
}

.preview-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #111827);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.preview-title i {
    color: var(--primary, #00008B);
    font-size: 20px;
}

.btn-preview {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.pdf-viewer-container {
    width: 100%;
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border, #e5e7eb);
    background: white;
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Progress Container */
.progress-container {
    margin: 24px 0;
    display: none;
}

.progress-bar-container {
    height: 8px;
    background: var(--border, #e5e7eb);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary, #00008B), #4338ca);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-light, #6b7280);
    text-align: center;
    margin-top: 8px;
}

/* Success & Error Messages */
.success-message {
    margin-top: 20px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #6ee7b7;
    color: #065f46;
    border-radius: 16px;
    text-align: center;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.error-message {
    margin-top: 20px;
    padding: 14px 20px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 16px;
    text-align: center;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #fecaca;
}

/* Loading Indicator */
.loading-indicator {
    display: none;
    margin: 30px 0;
    text-align: center;
    color: var(--primary, #00008B);
}

.loading-spinner {
    animation: spin 1s linear infinite;
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.loading-text {
    font-size: 14px;
    color: var(--text-light, #6b7280);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .content-textarea {
        min-height: 300px;
        font-size: 13px;
        padding: 16px;
    }
    
    .file-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pdf-viewer-container {
        height: 400px;
    }
    
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-preview {
        width: 100%;
        justify-content: center;
    }
}