/* Custom styles for the Letter Generator Application */

/* Hide elements during loading */
.hidden {
    display: none !important;
}

/* Navigation link styling */
.nav-link.active {
    background-color: #4f46e5;
    color: white !important;
}

/* View container styling */
.view-container {
    display: block;
}

/* Document upload area styling */
.file-drop-area {
    border: 2px dashed #cbd5e0;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.file-drop-area:hover {
    border-color: #4f46e5;
}

.file-drop-area.drag-over {
    border-color: #4f46e5;
    background-color: #eff6ff;
}

/* Table styling */
.table-container {
    overflow-x: auto;
}

.table th, .table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
}

/* Button styling */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

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

.btn-secondary:hover {
    background-color: #4b5563;
}

/* Card styling */
.card {
    background-color: white;
    border-radius: 0.5rem;
    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;
}

/* Alert styling */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-info {
    color: #0e7490;
    background-color: #cffafe;
    border-color: #bae6fd;
}

.alert-warning {
    color: #854d0e;
    background-color: #fef3c7;
    border-color: #fde68a;
}

.alert-error {
    color: #b91c1c;
    background-color: #fee2e2;
    border-color: #fecaca;
}

.alert-success {
    color: #166534;
    background-color: #dcfce7;
    border-color: #bbf7d0;
}

/* Form styling */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modal styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 90vw;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
    }
    
    .card {
        padding: 1rem;
    }
    
    .table-container {
        font-size: 0.8rem;
    }
}

/* Animation for loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Highlight for duplicate entries */
.duplicate-entry {
    background-color: #fffbeb; /* Yellow-50 */
}

.first-entry {
    background-color: #ecfdf5; /* Green-50 */
}