

  <style>
      .toast-container-custom {
          position: fixed;
          top: 20px;
          right: 20px;
          z-index: 9999;
      }

      /* Base Toast */
      .custom-toast {
          display: flex;
          align-items: center;
          gap: 15px;
          min-width: 300px;
          max-width: 380px;
          padding: 16px 18px;
          border-radius: 14px;
          color: #fff;
          font-family: 'Segoe UI', sans-serif;
          box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
          position: relative;
          overflow: hidden;

          animation: slideIn 0.5s ease, fadeOut 0.5s ease 3s forwards;
      }

      /* Success Theme */
      .toast-success {
          background: linear-gradient(135deg, #00c853, #43a047);
      }

      /* Error Theme */
      .toast-error {
          background: linear-gradient(135deg, #ff5252, #d32f2f);
      }

      /* Icon */
      .toast-icon {
          font-size: 22px;
          font-weight: bold;
      }

      /* Content */
      .toast-content {
          flex: 1;
      }

      .toast-title {
          font-weight: 600;
          font-size: 14px;
          margin-bottom: 2px;
      }

      .toast-message {
          font-size: 13px;
          opacity: 0.9;
      }

      /* Close Button */
      .toast-close {
          background: transparent;
          border: none;
          color: #fff;
          font-size: 18px;
          cursor: pointer;
      }

      /* Progress Bar */
      .toast-progress {
          position: absolute;
          bottom: 0;
          left: 0;
          height: 3px;
          width: 100%;
          background: rgba(255, 255, 255, 0.6);
          animation: progressBar 3s linear forwards;
      }

      /* Animations */
      @keyframes slideIn {
          from {
              transform: translateX(120%);
              opacity: 0;
          }

          to {
              transform: translateX(0);
              opacity: 1;
          }
      }

      @keyframes fadeOut {
          to {
              opacity: 0;
              transform: translateX(120%);
          }
      }

      @keyframes progressBar {
          from {
              width: 100%;
          }

          to {
              width: 0%;
          }
      }
  </style>

  <?php if(
  session('success') ||
  session('error') ||
  $errors->any() 
  ): ?>
  <div class="toast-container-custom">
      <div id="liveToast"
          class="custom-toast <?php echo e(session('success') ? 'toast-success' : 'toast-error'); ?>">

          <div class="toast-icon">
              <?php if(session('success')): ?>
              ✓
              <?php else: ?>
              ⚠
              <?php endif; ?>
          </div>

          <div class="toast-content">
              <div class="toast-title">
                  <?php echo e(session('success') ? 'Success' : 'Error'); ?>

              </div>

              <div class="toast-message">
                  <?php if(session('success')): ?>
                  <?php echo e(session('success')); ?>

                  <?php elseif(session('error')): ?>
                  <?php echo e(session('error')); ?>             
                  <?php elseif($errors->any()): ?>
                  <?php echo e($errors->first()); ?>

                  <?php endif; ?>
              </div>
          </div>

          <button class="toast-close" onclick="closeToast()">×</button>

          <div class="toast-progress"></div>
      </div>
  </div>
  <?php endif; ?>

  <script>
      function closeToast() {
          const toast = document.getElementById('liveToast');
          if (toast) {
              toast.style.animation = 'fadeOut 0.4s forwards';
          }
      }

      document.addEventListener('DOMContentLoaded', function() {
          const toast = document.getElementById('liveToast');

          if (toast) {
              setTimeout(() => {
                  closeToast();
              }, 3000);
          }
      });
  </script><?php /**PATH /var/www/html/omiga_ipl/resources/views/Layout/toast.blade.php ENDPATH**/ ?>