<style>
    /* --- New CSS for the Sticky Alert --- */

/* Container for the sticky alert */
.success-alert-container {
    /* Position fixed to float above other content */
    position: fixed; 
    top: 30px;
    right: 20px;
    z-index: 1000; /* Ensure it's on top */
    width: 100%;
    max-width: 400px; /* Constrain the size */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 15px; /* Match form wrapper style */
    overflow: hidden;
    animation: slideInRight 0.6s ease-out; /* Custom animation */
}

/* Re-style the base success message for the notification context */
.success-notification {
    text-align: left; /* Align content to the left */
    padding: 20px 25px; 
    display: flex; /* Use flex for icon and text alignment */
    align-items: center;
    gap: 15px;
    background: white; /* Solid white background for visibility */
}

/* Adjustments for elements inside the notification */
.success-notification h2 {
    font-size: 20px;
    margin-bottom: 5px;
    color: #4ade80; /* Use the green success color */
}

.success-notification p {
    font-size: 14px;
    color: #666;
    margin-bottom: 0;
}

.success-notification .success-icon {
    font-size: 30px;
    color: #4ade80;
    margin-bottom: 0;
}

/* Close button style */
.close-btn {
    all: unset; /* Remove all default button styling */
    cursor: pointer;
    font-size: 18px;
    color: #999;
    padding: 5px;
    margin-left: auto; /* Push the button to the right */
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #ee7752; /* Hover effect */
}

/* Animation for sliding in */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
</style>
<?php if(isset ($errors) && count($errors) > 0): ?>
    <div class="alert alert-danger alert-notification">
        <ul class="list-unstyled mb-0">
            <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <li><?php echo e($error); ?></li>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </ul>
    </div>
<?php endif; ?>

<?php if(Session::get('success', false)): ?>
    <?php $data = Session::get('success'); ?>
    <?php if(is_array($data)): ?>
        <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $msg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div id="stickySuccessAlert" class="success-alert-container">
    <div class="success-message success-notification">
        <div class="success-icon">
            <i class="fas fa-bell"></i>
        </div>
        <div>
            <h2>Hello!</h2>
            <p><?php echo e($msg); ?></p>
        </div>
        <button class="close-btn" onclick="document.getElementById('stickySuccessAlert').style.display='none'">
            <i class="fas fa-times"></i>
        </button>
    </div>
</div>

             
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    <?php else: ?>
       
        <div id="stickySuccessAlert" class="success-alert-container">
    <div class="success-message success-notification">
        <div class="success-icon">
            <i class="fas fa-bell"></i>
        </div>
        <div>
            <h2>Hello!</h2>
            <p><?php echo e($data); ?></p>
        </div>
        <button class="close-btn" onclick="document.getElementById('stickySuccessAlert').style.display='none'">
            <i class="fas fa-times"></i>
        </button>
    </div>
</div>
    <?php endif; ?>
<?php endif; ?>
<?php /**PATH /Applications/AMPPS/www/military/resources/views/partials/messages2.blade.php ENDPATH**/ ?>