/* JPG to PDF Converter Specific Styles */

/* Format tags styling */
.supported-formats {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.format-tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* File list styling for images */
.file-list-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.file-item {
    cursor: move;
    transition: all 0.3s ease;
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.file-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.file-item.drag-over {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.file-order {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.file-preview {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.file-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.file-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Settings panel styling */
.settings-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.settings-panel h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
}

.setting-group label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.setting-group select,
.setting-group input {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.setting-group select:focus,
.setting-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Action section styling */
.action-section {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: var(--radius-lg);
}

.action-section .btn-large {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.action-section .btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

.action-section .btn-large:active {
    transform: translateY(-1px);
}

.action-section .btn-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-section .btn-large:hover::before {
    left: 100%;
}

/* Results section styling */
.results-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 1.5rem;
}

/* Success Message */
.success-message {
    text-align: center;
    margin-bottom: 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem auto;
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    animation: successPulse 2s ease-in-out infinite alternate;
}

.success-icon i {
    font-size: 2rem;
    color: white;
}

.success-message h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.success-message p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Primary Download Section */
.primary-download-section {
    text-align: center;
    margin-bottom: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 200px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
}

.btn-large i {
    font-size: 1.2rem;
}

@keyframes successPulse {
    0% {
        box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 15px 35px rgba(16, 185, 129, 0.5);
        transform: scale(1.05);
    }
}

.result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.result-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.result-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.result-actions {
    flex-shrink: 0;
}

/* Loading section styling */
.loading-section {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
}

.loading-spinner {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-text {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .file-preview {
        width: 50px;
        height: 50px;
    }
    
    .file-info {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .result-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .result-actions {
        width: 100%;
    }
    
    .result-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .supported-formats {
        gap: 0.25rem;
    }
    
    .format-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
    
    .file-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .file-actions .btn {
        width: 100%;
    }
}

/* Error Message Styling */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.error-message i {
    font-size: 1.1rem;
    color: #dc2626;
}

/* Enhanced Image Item Styling */
.image-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: move;
}

.image-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.image-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.image-preview-container {
    position: relative;
    flex-shrink: 0;
}

.image-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-base);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-base);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.image-preview-container:hover .image-overlay {
    opacity: 1;
}

.image-overlay-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-overlay-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.image-info {
    flex: 1;
    min-width: 0;
}

.image-details h4 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.image-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.file-action-btn {
    padding: 0.5rem;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-base);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.file-action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.file-action-btn.download-btn:hover {
    background: var(--secondary-color);
}

.file-action-btn.remove:hover {
    background: var(--danger-color);
}

.file-action-btn.move-up:hover,
.file-action-btn.move-down:hover {
    background: var(--accent-color);
}

/* Image Preview Modal */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-base);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-color);
}

.modal-body {
    padding: 0;
    text-align: center;
}

.modal-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-footer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive Design for Image Items */
@media (max-width: 768px) {
    .image-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .image-preview-container {
        align-self: center;
    }
    
    .image-info {
        text-align: center;
    }
    
    .image-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .file-action-btn {
        width: 40px;
        height: 40px;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .modal-header h3 {
        max-width: 200px;
        font-size: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Enhanced Results Section */
.result-additional-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.additional-action-item {
    margin-bottom: 1rem;
}

.additional-action-item h5 {
    margin: 0 0 0.75rem 0;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.additional-action-item h5 i {
    color: var(--primary-color);
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-buttons .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.btn.success {
    background: var(--success-color) !important;
    color: white !important;
    border-color: var(--success-color) !important;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.result-actions .btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

/* Responsive Results Section */
@media (max-width: 768px) {
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-buttons .btn {
        width: 100%;
        min-width: auto;
    }
}

/* Loading Section Styling */
.loading-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    margin-top: 1.5rem;
    text-align: center;
}

.loading-content {
    max-width: 400px;
    margin: 0 auto;
}

.loading-spinner {
    margin-bottom: 1.5rem;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.loading-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
