.row-contact {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.row-contact.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form navigation indicators */
.line {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    position: relative;
}

.line::before {
    content: '';
    position: absolute;
    height: 2px;
    width: 100%;
    background-color: #e0e0e0;
    top: 50%;
    z-index: 0;
}

.line-column-3 .line1, 
.line-column-3 .line2,
.line-column-3 .line3 {
    width: 33.33%;
    height: 4px;
    background-color: #4FCE5D;
    position: relative;
    z-index: 1;
}

.line .line1, 
.line .line2,
.line .line3,
.line .line4,
.line .line5 {
    width: 20%;
    height: 4px;
    background-color: #4FCE5D;
    position: relative;
    z-index: 1;
}

/* Form field styling */
.form-control {
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.help-block.with-errors {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: -8px;
    margin-bottom: 15px;
    min-height: 20px;
}

.error-message {
    display: block;
    color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Button styling */
.form-group-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.form-group-buttons.center {
    justify-content: center;
}

.form-group-buttons button {
    min-width: 120px;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

button[id^="buttonNext"] {
    background-color: #4FCE5D;
    color: white;
}

button[id^="buttonBack"] {
    background-color: #e0e0e0;
    color: #333;
}

button[type="submit"] {
    background-color: #4FCE5D;
    color: white;
    padding: 12px 30px;
    font-size: 1.1rem;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* File upload styling */
input[type="file"] {
    padding: 8px;
}

.file-preview {
    margin-top: 8px;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.file-thumbnail {
    max-width: 100px;
    max-height: 100px;
    margin-top: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.file-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.file-name {
    font-weight: bold;
    word-break: break-all;
}

.file-size {
    color: #666;
    white-space: nowrap;
    margin-left: 10px;
}

/* Alert messages */
.alert {
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    animation: slideDown 0.5s ease-in-out;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Required field indicator */
label span {
    color: #dc3545;
    margin-left: 3px;
}

/* Radio buttons styling */
.form-check {
    margin-bottom: 15px;
}

.form-check div {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.form-check input[type="radio"],
.form-check input[type="checkbox"] {
    margin-right: 10px;
}

/* Date picker custom styling */
.flatpickr-calendar {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.flatpickr-day.selected {
    background-color: #4FCE5D !important;
    border-color: #4FCE5D !important;
}

/* Spinner for submit button */
.spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 8px;
    vertical-align: text-bottom;
}

/* Section headers */
.form h6 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #4FCE5D;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Conditional fields */
#outstanding_offences_details_container,
#safety_breach_details_container,
#contract_removal_details_container {
    display: none;
    margin-top: 10px;
    padding: 15px;
    border-left: 3px solid #4FCE5D;
    background-color: #f9f9f9;
    border-radius: 0 4px 4px 0;
}

/* Declaration section */
.declaration-text {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.declaration-text p {
    margin-bottom: 10px;
}

.declaration-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.declaration-checkbox input {
    margin-right: 10px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .form-group-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group-buttons button {
        width: 100%;
    }
    
    .file-info {
        flex-direction: column;
    }
    
    .file-size {
        margin-left: 0;
        margin-top: 5px;
    }
}