/* Custom styles for Dispute Letter Generator */

/* Override minimal custom styles - rely on Bootstrap theme */
:root {
    --primary-gradient: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
}

/* Loading states */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* File upload styling */
.form-control[type="file"] {
    padding: 0.5rem;
}

.form-control[type="file"]:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Card hover effects */
.card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
}

/* Form validation styling */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--bs-success);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--bs-danger);
}

/* Progress indicators */
.progress-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--bs-primary);
    color: white;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* Success/Error message animations */
.alert {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles for generated letters */
@media print {
    .navbar, .footer, .alert, .card-header, .btn {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Custom icons spacing */
.fas + * {
    margin-left: 0.25rem;
}

/* Form section spacing */
.border-bottom {
    border-bottom: 2px solid var(--bs-border-color) !important;
}

/* Success page specific styles */
.text-success {
    color: var(--bs-success) !important;
}

.bg-success {
    background-color: var(--bs-success) !important;
}

/* Card layouts */
.card-body .row:last-child {
    margin-bottom: 0;
}

/* File upload preview */
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.file-preview-item {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--bs-light);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.file-preview-item .remove-file {
    margin-left: 0.5rem;
    cursor: pointer;
    color: var(--bs-danger);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner {
    color: white;
    font-size: 2rem;
}
