/* ===========================================================
   Notification Container
   =========================================================== */

#notif-container {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translate(-50%);
  width: 90%;
  max-width: 420px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: none;
}

/* ===========================================================
   Notification Base
   =========================================================== */

.notif {
  position: relative;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  padding: 20px 22px 24px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
}

.notif.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================================
   Colors
   =========================================================== */

.notif.info {
  background: #e8f1ff;
  color: #084298;
  border-left: 5px solid #0d6efd;
}

.notif.success {
  background: #e9f7ef;
  color: #0f5132;
  border-left: 5px solid #198754;
}

.notif.warning {
  background: #fff4e5;
  color: #664d03;
  border-left: 5px solid #ffc107;
}

.notif.error {
  background: #f8d7da;
  color: #842029;
  border-left: 5px solid #dc3545;
}

/* ===========================================================
   Notification Content
   =========================================================== */

.notif-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1em;
  margin-bottom: 6px;
}

.notif-text {
  font-size: 0.95em;
  color: inherit;
  margin-top: 4px;
  line-height: 1.45;
}

/* ===========================================================
   Desktop Close Button
   =========================================================== */

.notif-close {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.1em;       /* kleiner machen */
    line-height: 1;
    padding: 0;
    margin-left: 8px;
    height: 24px;            /* gleiche Höhe wie Header-Line */
    width: 24px;

    opacity: 0.55;
    color: rgba(0,0,0,0.4);
    background: none;
    border: none;
}

.notif-close .material-symbols-outlined {
    font-size: 20px;        /* sonst ist Material Symbol zu groß */
}
.notif-header-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-close:hover {
  opacity: 0.8;
}
/* Close button nur auf Desktop */
@media (min-width: 600px) {
  .notif-close {
    position: absolute;
    top: 10px;      /* exakt in die Ecke */
    right: 12px;

    cursor: pointer;
    background: none;
    border: none;

    font-size: 1.2em;
    opacity: 0.55;
    color: rgba(0,0,0,0.4);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    height: 22px;
    width: 22px;
  }

  .notif-close:hover {
    opacity: 0.9;
  }
}

/* Mobil: Close-Button komplett ausblenden (Swipe-only) */
@media (max-width: 599px) {
  .notif-close {
    display: none;
  }
}
/* ===========================================================
   Confirm Buttons
   =========================================================== */

.notif-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.notif-actions .notif-btn {
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  background: #007bff;
  color: #fff;
}

/* ===========================================================
   Swipe-Out Animation
   =========================================================== */

.notif.swipe-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: transform .25s ease, opacity .25s ease;
}

/* ===========================================================
   MOBILE BEHAVIOUR
   =========================================================== */

/* Auf Mobilgeräten: X-Button ausblenden, nur Swipe */
@media (max-width: 480px) {
  .notif {
    padding: 16px 18px 20px;
  }

  .notif-title {
    font-size: 1em;
  }

  .notif-close {
    display: none !important;
  }
}

/* ===========================================================
   Modal
   =========================================================== */

#modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


.m-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;

    background: #fff;
    padding: 28px;
    border-radius: 14px;
    max-width: 420px;
    width: 90%;

    box-shadow: 0 4px 20px rgba(0,0,0,0.15);

    z-index: 9999;
    opacity: 0;
    animation: modalFadeIn 0.18s ease forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}



.m-modal h2 {
    margin: 0 0 16px 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    color: #222;
}

/* Text */
.m-modal p {
    margin: 0 0 22px 0;
    text-align: left;
    color: #444;
    line-height: 1.5;
}

/* Actions */
.m-modal-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
}

/* Buttons im neuen Stil */
.m-modal .btn-ok,
.m-modal .btn-cancel {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Primary Button */
.m-modal .btn-ok {
    background: #0d6efd;
    color: white;
    box-shadow: 0 2px 6px rgba(13,110,253,0.25);
}

/* Ghost Button */
.m-modal .btn-cancel {
    background: #f5f5f5;
    color: #333;
}

.m-modal .btn-cancel:hover {
    background: #e8e8e8;
}

.m-modal input[type="text"],
.m-modal input[type="number"],
.m-modal input[type="search"],
.m-modal input[type="password"] {
    width: 100%;
    box-sizing: border-box;      /* verhindert Überbreite */
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background: #fff;
    margin: 8px 0 18px 0;
    outline: none;
}

.m-modal input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

