/* Shared Tools CSS - Generic Styles for all PDF Tools */

/* Main Container */
.tool-main-container,
.compress-main-container {
    background-color: #f8fafc;
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}

/* Upload View */
.tool-upload-container,
.compress-upload-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background: white;
    position: relative;
    overflow: hidden;
}

/* Background Pattern */
.tool-upload-container::before,
.compress-upload-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/assets/bg-pattern-editor-sejda.svg');
    background-size: cover;
    opacity: 0.7;
    z-index: 0;
}

.tool-upload-card,
.compress-upload-card {
    text-align: center;
    max-width: 650px;
    width: 100%;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.tool-hero-title,
.compress-hero-title {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 12px;
    font-weight: 600;
}

.tool-hero-subtitle,
.compress-hero-subtitle {
    font-size: 1.1rem;
    color: #2563eb;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Features Section */
.tool-features,
.compress-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 20px;
    width: 100%;
    max-width: 1000px;
    position: relative;
    z-index: 1;
}

.tool-feature-item,
.compress-feature-item {
    background: white;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f1f5f9;
}

.tool-feature-item:hover,
.compress-feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.tool-feature-icon,
.compress-feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--primary, #2563eb);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 24px;
}

.tool-feature-item h4,
.compress-feature-item h4 {
    color: #0f172a;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1.1rem;
}

.tool-feature-item p,
.compress-feature-item p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Upload Button */
.btn-upload-tool,
.btn-upload-compress {
    background-color: #2563eb;
    color: white;
    font-size: 18px;
    padding: 16px 48px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-upload-tool:hover,
.btn-upload-compress:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.25);
}

.btn-upload-tool:active,
.btn-upload-compress:active {
    transform: translateY(1px);
}

/* Helper Texts */
.upload-helper-text {
    color: #a0aec0;
    font-size: 0.9rem;
    margin-top: 16px;
    margin-bottom: 8px;
}

.upload-privacy-text {
    color: #718096;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {

    .tool-features,
    .compress-features {
        grid-template-columns: 1fr;
    }
}

/* Shared Settings/Form Styles (Moved from protect-pdf.html) */
.settings-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.settings-group {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.settings-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group {
    margin-bottom: 0.5rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-group input[type="password"],
.input-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: border-color 0.15s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.helper-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.action-row {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-secondary {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-primary {
    background: #4f46e5;
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
}

/* Specific Utilities */
.hidden {
    display: none;
}

/* PDF to Excel - Loading, Success, and Error States */
.loading-state,
.success-state,
.error-state {
    padding: 60px 40px;
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state h2 {
    color: #2d3748;
    font-size: 1.75rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.loading-state p,
.success-state p,
.error-state p {
    color: #64748b;
    font-size: 1.05rem;
    margin-top: 12px;
}

.success-state .success-icon {
    font-size: 4.5rem;
    color: #10b981;
    margin-bottom: 20px;
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.success-state h2 {
    color: #059669;
    font-size: 1.75rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.error-state .error-icon {
    font-size: 4.5rem;
    color: #ef4444;
    margin-bottom: 20px;
    animation: shake 0.5s ease-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.error-state h2 {
    color: #dc2626;
    font-size: 1.75rem;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Drag over state */
.drag-over {
    background-color: #eff6ff;
    border: 2px dashed #2563eb;
    border-radius: 12px;
}
/* Mode Selection UI */
.mode-selection-title {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 600;
}

.mode-selection-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 32px;
}

.mode-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.mode-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mode-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    transform: translateY(-4px);
}

.mode-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.mode-card h3 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 8px;
}

.mode-description {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 20px;
}

.mode-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: left;
}

.mode-features li {
    padding: 6px 0;
    color: #475569;
    font-size: 0.9rem;
}

.btn-mode-select {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-mode-select:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.btn-mode-select i {
    margin-right: 8px;
}

.btn-back-to-upload {
    background: transparent;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back-to-upload:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

@media (max-width: 768px) {
    .mode-options {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .mode-selection-title {
        font-size: 1.6rem;
    }
    
    .mode-card {
        padding: 24px;
    }
    
    .mode-icon {
        font-size: 2.8rem;
    }
}
