/* PDF Investigation Form Generator Styles */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* PDF Upload Area */
.pdf-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 3rem;
    margin: 1rem;
    text-align: center;
    background-color: #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pdf-upload-area:hover {
    border-color: #007bff;
    background-color: #f8f9ff;
}

.pdf-upload-area.dragover {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

/* PDF Canvas */
#pdfCanvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Form Styles */
.card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

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

.form-control, .form-select {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Required field indicator */
.form-label:has(+ .form-control:required)::after,
.form-label:has(+ .form-select:required)::after {
    content: " *";
    color: #dc3545;
}

/* Border bottom for section headers */
.border-bottom {
    border-bottom: 2px solid #007bff !important;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Button Styles */
.btn {
    border-radius: 4px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

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

/* Generated Form Styles */
#generatedFormContent {
    background: white;
    padding: 2rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-family: 'Times New Roman', serif;
    line-height: 1.6;
}

.investigation-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
}

.investigation-section {
    margin-bottom: 2rem;
}

.investigation-section h6 {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-left: 4px solid #007bff;
    font-weight: 600;
    margin-bottom: 1rem;
}

.investigation-field {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.investigation-field .field-label {
    font-weight: 600;
    min-width: 150px;
    margin-right: 1rem;
}

.investigation-field .field-value {
    flex: 1;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 2px;
    min-height: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .pdf-upload-area {
        padding: 2rem;
        margin: 0.5rem;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .investigation-field {
        flex-direction: column;
    }
    
    .investigation-field .field-label {
        min-width: auto;
        margin-bottom: 0.25rem;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

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

/* Alert Styles */
.alert {
    border-radius: 4px;
    border: none;
    padding: 1rem;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Tooltip Styles */
.tooltip {
    font-size: 0.875rem;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal-header,
    .modal-footer {
        display: none !important;
    }
    
    #generatedFormContent {
        border: none !important;
        box-shadow: none !important;
    }
    
    .investigation-field .field-value {
        border-bottom: 1px solid #000 !important;
    }
}