/* Backup Modal Styles */
.backup-section, .restore-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
}

.backup-section:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}

.backup-section h4, .restore-section h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1.1em;
    font-weight: 600;
}

.backup-section p, .restore-section p {
    margin: 0 0 16px 0;
    color: #6c757d;
    line-height: 1.5;
}

.backup-info {
    margin: 16px 0 20px 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.backup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: #495057;
}

.backup-item:last-child {
    margin-bottom: 0;
}

.backup-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.backup-actions, .restore-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.backup-progress {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Import progress specific styling */
#importProgress {
    margin-top: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.backup-progress p {
    margin: 0;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .backup-actions, .restore-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .backup-actions .btn, .restore-actions .btn {
        margin-bottom: 8px;
    }
    
    .backup-info {
        padding: 12px;
    }
}

/* Enhanced button styling for backup modal */
#backupModalContainer .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

#backupModalContainer .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

#backupModalContainer .btn-primary {
    background: #007bff;
    color: white;
}

#backupModalContainer .btn-primary:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
}

#backupModalContainer .btn-secondary {
    background: #6c757d;
    color: white;
}

#backupModalContainer .btn-secondary:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-1px);
}

#backupModalContainer .btn-icon {
    padding: 8px;
    background: transparent;
    color: #6c757d;
    border-radius: 4px;
}

#backupModalContainer .btn-icon:hover {
    background: #f8f9fa;
    color: #495057;
}

#backupModalContainer .text-muted {
    color: #6c757d;
    font-size: 12px;
    margin-top: 8px;
}

/* Modal size adjustment for backup modal */
#backupModalContainer .modal-content {
    max-width: 600px;
    width: 90vw;
}

/* Hidden input styling */
#backupModalContainer .hidden-input {
    display: none;
}

/* Welcome Modal Styles */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.welcome-modal.hidden {
    display: none;
}

.welcome-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.welcome-header {
    text-align: center;
    padding: 32px 32px 24px;
    border-bottom: 1px solid #e9ecef;
}

.welcome-icon {
    margin-bottom: 16px;
}

.welcome-icon img {
    border-radius: 8px;
}

.welcome-header h2 {
    margin: 0 0 8px 0;
    color: #212529;
    font-size: 1.75rem;
    font-weight: 700;
}

.welcome-subtitle {
    margin: 0;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.5;
}

.welcome-body {
    padding: 32px;
    flex: 1;
}

.welcome-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.welcome-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.welcome-step .step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.welcome-step .step-content {
    flex: 1;
}

.welcome-step .step-content h3 {
    margin: 0 0 8px 0;
    color: #212529;
    font-size: 1.1rem;
    font-weight: 600;
}

.welcome-step .step-content p {
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
}

.welcome-privacy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #e8f5e8;
    border-radius: 8px;
    border: 1px solid #c3e6c3;
}

.welcome-privacy svg {
    flex-shrink: 0;
    color: #28a745;
    margin-top: 2px;
}

.welcome-privacy span {
    color: #155724;
    font-size: 0.9rem;
    line-height: 1.5;
}

.welcome-footer {
    padding: 24px 32px;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.welcome-footer .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #6c757d;
    font-size: 0.9rem;
}

.welcome-actions {
    display: flex;
    justify-content: center;
}

.welcome-actions .btn {
    min-width: 160px;
}

/* Categories Welcome Modal Specific Styles */
.categories-welcome-modal .welcome-explanation {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.categories-welcome-modal .explanation-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.categories-welcome-modal .explanation-box h3 {
    margin: 0 0 8px 0;
    color: #212529;
    font-size: 1rem;
    font-weight: 600;
}

.categories-welcome-modal .explanation-box p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.categories-welcome-modal .welcome-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin-top: 24px;
}

.categories-welcome-modal .welcome-tip svg {
    flex-shrink: 0;
    color: #856404;
    margin-top: 2px;
}

.categories-welcome-modal .welcome-tip span {
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive design for welcome modal */
@media (max-width: 768px) {
    .welcome-modal {
        padding: 10px;
    }
    
    .welcome-modal-content {
        max-height: 95vh;
    }
    
    .welcome-header {
        padding: 24px 20px 20px;
    }
    
    .welcome-header h2 {
        font-size: 1.5rem;
    }
    
    .welcome-body {
        padding: 24px 20px;
    }
    
    .welcome-steps {
        gap: 20px;
    }
    
    .welcome-step {
        gap: 16px;
    }
    
    .welcome-step .step-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .welcome-footer {
        padding: 20px;
    }

    .categories-welcome-modal .welcome-explanation {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Stored Transactions Welcome Modal Specific Styles */
.stored-transactions-welcome .welcome-empty-state {
    text-align: center;
    padding: 24px 0;
    margin-bottom: 32px;
}

.stored-transactions-welcome .empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.stored-transactions-welcome .welcome-empty-state h3 {
    margin: 0 0 8px 0;
    color: #212529;
    font-size: 1.5rem;
    font-weight: 600;
}

.stored-transactions-welcome .welcome-empty-state p {
    margin: 0;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.5;
}

.stored-transactions-welcome .welcome-tips {
    margin-top: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stored-transactions-welcome .welcome-tips h4 {
    margin: 0 0 12px 0;
    color: #212529;
    font-size: 1.1rem;
    font-weight: 600;
}

.stored-transactions-welcome .welcome-tips ul {
    margin: 0;
    padding-left: 20px;
    color: #495057;
    line-height: 1.8;
}

.stored-transactions-welcome .welcome-tips li {
    margin-bottom: 8px;
}

.stored-transactions-welcome .welcome-tips li:last-child {
    margin-bottom: 0;
}

.stored-transactions-welcome .welcome-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.stored-transactions-welcome .welcome-actions .btn {
    min-width: 140px;
}

/* Responsive adjustments for stored transactions welcome */
@media (max-width: 768px) {
    .stored-transactions-welcome .welcome-tips {
        padding: 16px;
    }
    
    .stored-transactions-welcome .welcome-actions {
        flex-direction: column;
    }
    
    .stored-transactions-welcome .welcome-actions .btn {
        width: 100%;
    }
}

/* Rules Welcome Modal Specific Styles */
.rules-welcome-modal .welcome-icon svg {
    color: #667eea;
}

.welcome-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin-bottom: 24px;
}

.welcome-alert svg {
    flex-shrink: 0;
    color: #856404;
    margin-top: 2px;
}

.welcome-alert strong {
    display: block;
    color: #856404;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.welcome-alert p {
    margin: 0 0 8px 0;
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.5;
}

.welcome-examples {
    margin-top: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.welcome-examples h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.example-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.example-item {
    padding: 10px 12px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
}

.example-item strong {
    color: #212529;
    font-weight: 600;
}

/* Welcome Tips Section */
.welcome-tips {
    margin-top: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.welcome-tips h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.welcome-tips ul {
    margin: 0;
    padding-left: 20px;
    color: #6c757d;
}

.welcome-tips li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.welcome-tips li:last-child {
    margin-bottom: 0;
}

.welcome-tips strong {
    color: #495057;
    font-weight: 600;
}

/* Responsive adjustments for rules welcome modal */
@media (max-width: 768px) {
    .welcome-alert {
        flex-direction: column;
        gap: 8px;
    }
    
    .welcome-examples {
        padding: 12px;
    }
    
    .example-item {
        font-size: 0.85rem;
    }
    
    .welcome-tips {
        padding: 16px;
    }
}
