/*
============================================================
Club OS Studio
Datei: notifications.css
Zweck: Systemmeldungen und Benachrichtigungen
Phase: 13.12 - Notifications Frontend
============================================================
*/

.notification-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;

  margin-bottom: 22px;
}

.notification-summary-card {
  position: relative;
  overflow: hidden;

  min-height: 142px;

  padding: 21px;
}

.notification-summary-card::after {
  position: absolute;
  right: -38px;
  bottom: -52px;

  width: 135px;
  height: 135px;

  border-radius: 50%;

  background: rgba(124, 77, 255, 0.1);

  content: "";
}

.notification-summary-card__header {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 21px;
}

.notification-summary-card__label {
  color: var(--studio-text-muted);

  font-size: 0.75rem;
  font-weight: 720;
}

.notification-summary-card__icon {
  display: grid;

  width: 38px;
  height: 38px;

  border-radius: 11px;

  color: var(--studio-primary-light);
  background: rgba(124, 77, 255, 0.13);

  place-items: center;
}

.notification-summary-card__value {
  position: relative;
  z-index: 1;

  display: block;
  overflow: hidden;

  margin-bottom: 4px;

  font-size: 1.55rem;
  font-weight: 850;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-summary-card__meta {
  position: relative;
  z-index: 1;

  color: var(--studio-text-soft);

  font-size: 0.67rem;
}

.notification-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;

  margin-bottom: 20px;
}

.notification-toolbar__filters {
  display: grid;
  grid-template-columns:
    minmax(260px, 1fr)
    minmax(170px, 215px)
    minmax(170px, 215px)
    minmax(170px, 215px);
  gap: 13px;

  width: min(100%, 1160px);
}

.notification-filter {
  display: grid;
  gap: 7px;
}

.notification-filter label {
  color: var(--studio-text-muted);

  font-size: 0.71rem;
  font-weight: 720;
}

.notification-search {
  position: relative;
}

.notification-search__icon {
  position: absolute;
  top: 50%;
  left: 15px;

  color: var(--studio-text-soft);

  transform: translateY(-50%);

  pointer-events: none;
}

.notification-search__input,
.notification-filter__select {
  width: 100%;
  min-height: 47px;

  padding: 11px 14px;

  border: 1px solid var(--studio-border-strong);
  border-radius: var(--studio-radius-sm);
  outline: none;

  color: var(--studio-text);
  background: var(--studio-surface);

  transition:
    border-color var(--studio-transition),
    box-shadow var(--studio-transition),
    background var(--studio-transition);
}

.notification-search__input {
  padding-left: 43px;
}

.notification-search__input::placeholder {
  color: var(--studio-text-soft);
}

.notification-search__input:focus,
.notification-filter__select:focus {
  border-color: var(--studio-primary);

  background: var(--studio-surface-soft);

  box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.11);
}

.notification-filter__select option {
  color: var(--studio-text);
  background: var(--studio-surface);
}

.notification-result-count {
  color: var(--studio-text-muted);

  font-size: 0.77rem;
  white-space: nowrap;
}

.notification-table-card {
  overflow: hidden;
}

.notification-table-wrapper {
  overflow-x: auto;
}

.notification-table {
  width: 100%;

  border-collapse: collapse;
}

.notification-table th,
.notification-table td {
  padding: 16px 18px;

  border-bottom: 1px solid var(--studio-border);

  text-align: left;
  vertical-align: middle;
}

.notification-table th {
  color: var(--studio-text-soft);
  background: rgba(255, 255, 255, 0.018);

  font-size: 0.67rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.notification-table tbody tr {
  transition: background var(--studio-transition);
}

.notification-table tbody tr:hover {
  background: rgba(124, 77, 255, 0.05);
}

.notification-table tbody tr:last-child td {
  border-bottom: none;
}

.notification-identity {
  display: grid;
  gap: 4px;

  min-width: 270px;
}

.notification-identity__title {
  overflow: hidden;

  max-width: 350px;

  font-size: 0.78rem;
  font-weight: 760;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-identity__message {
  overflow: hidden;

  max-width: 350px;

  color: var(--studio-text-soft);

  font-size: 0.65rem;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-type-badge,
.notification-scope-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 9px;

  border: 1px solid var(--studio-border);
  border-radius: 999px;

  color: var(--studio-text-muted);
  background: var(--studio-surface-soft);

  font-size: 0.65rem;
  font-weight: 740;
  white-space: nowrap;
}

.notification-severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 9px;

  border: 1px solid transparent;
  border-radius: 999px;

  font-size: 0.65rem;
  font-weight: 740;
  white-space: nowrap;
}

.notification-severity-badge--info {
  border-color: rgba(96, 165, 250, 0.3);

  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.1);
}

.notification-severity-badge--success {
  border-color: rgba(54, 211, 153, 0.3);

  color: #a7f3d0;
  background: rgba(54, 211, 153, 0.1);
}

.notification-severity-badge--warning {
  border-color: rgba(248, 197, 85, 0.3);

  color: #fde7a7;
  background: rgba(248, 197, 85, 0.1);
}

.notification-severity-badge--danger {
  border-color: rgba(251, 113, 133, 0.32);

  color: #fecdd3;
  background: rgba(251, 113, 133, 0.1);
}

.notification-target {
  display: grid;
  gap: 2px;

  min-width: 150px;
}

.notification-target__name {
  font-size: 0.73rem;
  font-weight: 710;
}

.notification-target__scope {
  color: var(--studio-text-soft);

  font-size: 0.62rem;
}

.notification-period {
  display: grid;
  gap: 2px;

  min-width: 145px;
}

.notification-period__value {
  font-size: 0.7rem;
  font-weight: 700;
}

.notification-period__meta {
  color: var(--studio-text-soft);

  font-size: 0.62rem;
}

.notification-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.notification-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 37px;

  padding: 7px 10px;

  border: 1px solid var(--studio-border);
  border-radius: 9px;

  color: var(--studio-text-muted);
  background: var(--studio-surface-soft);

  font-size: 0.68rem;
  font-weight: 720;

  transition:
    color var(--studio-transition),
    border-color var(--studio-transition),
    background var(--studio-transition),
    transform var(--studio-transition);
}

.notification-action-button:hover {
  transform: translateY(-1px);

  border-color: rgba(124, 77, 255, 0.4);

  color: white;
  background: rgba(124, 77, 255, 0.13);
}

.notification-action-button--success {
  border-color: rgba(54, 211, 153, 0.26);

  color: #a7f3d0;
}

.notification-action-button--danger {
  border-color: rgba(251, 113, 133, 0.26);

  color: #fecdd3;
}

.notification-mobile-list {
  display: none;
}

.notification-mobile-card {
  padding: 18px;
}

.notification-mobile-card + .notification-mobile-card {
  margin-top: 13px;
}

.notification-mobile-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;

  margin-bottom: 14px;
}

.notification-mobile-card__message {
  margin-bottom: 15px;
  padding: 12px;

  border: 1px solid var(--studio-border);
  border-radius: 10px;

  color: var(--studio-text-muted);
  background: rgba(255, 255, 255, 0.018);

  font-size: 0.7rem;
  line-height: 1.5;
}

.notification-mobile-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;

  margin-bottom: 15px;
}

.notification-mobile-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;

  margin-bottom: 15px;
}

.notification-mobile-stat {
  padding: 11px;

  border: 1px solid var(--studio-border);
  border-radius: 9px;

  background: rgba(255, 255, 255, 0.018);
}

.notification-mobile-stat__label {
  display: block;

  margin-bottom: 4px;

  color: var(--studio-text-soft);

  font-size: 0.62rem;
  font-weight: 700;
}

.notification-mobile-stat__value {
  display: block;
  overflow: hidden;

  font-size: 0.72rem;
  font-weight: 720;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-mobile-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

/*
============================================================
NOTIFICATION MODAL
============================================================
*/

.notification-modal-backdrop {
  position: fixed;
  z-index: 5500;
  inset: 0;

  display: grid;

  padding: 24px;

  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);

  place-items: center;
}

.notification-modal {
  overflow: hidden;

  width: min(100%, 900px);
  max-height: calc(100vh - 48px);

  border: 1px solid var(--studio-border-strong);
  border-radius: var(--studio-radius-lg);

  background:
    linear-gradient(145deg, rgba(124, 77, 255, 0.09), transparent 28%),
    var(--studio-surface);

  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.54);
}

.notification-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;

  padding: 23px 26px;

  border-bottom: 1px solid var(--studio-border);
}

.notification-modal__title {
  margin-bottom: 4px;

  font-size: 1.12rem;
}

.notification-modal__description {
  margin-bottom: 0;

  color: var(--studio-text-muted);

  font-size: 0.72rem;
}

.notification-modal__close {
  display: grid;
  flex: 0 0 auto;

  width: 39px;
  height: 39px;

  border: 1px solid var(--studio-border);
  border-radius: 10px;

  color: var(--studio-text-muted);
  background: var(--studio-surface-soft);

  font-size: 1.05rem;

  place-items: center;
}

.notification-modal__body {
  overflow-y: auto;

  max-height: calc(100vh - 210px);

  padding: 24px 26px;
}

.notification-form {
  display: grid;
  gap: 19px;
}

.notification-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.notification-field {
  display: grid;
  gap: 7px;
}

.notification-field--full {
  grid-column: 1 / -1;
}

.notification-field label {
  color: var(--studio-text-muted);

  font-size: 0.72rem;
  font-weight: 720;
}

.notification-field input,
.notification-field select,
.notification-field textarea {
  width: 100%;

  padding: 11px 13px;

  border: 1px solid var(--studio-border-strong);
  border-radius: var(--studio-radius-sm);
  outline: none;

  color: var(--studio-text);
  background: rgba(255, 255, 255, 0.025);

  transition:
    border-color var(--studio-transition),
    box-shadow var(--studio-transition),
    background var(--studio-transition);
}

.notification-field input,
.notification-field select {
  min-height: 46px;
}

.notification-field textarea {
  min-height: 140px;

  resize: vertical;
}

.notification-field input:focus,
.notification-field select:focus,
.notification-field textarea:focus {
  border-color: var(--studio-primary);

  background: var(--studio-surface-soft);

  box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.11);
}

.notification-field select option {
  color: var(--studio-text);
  background: var(--studio-surface);
}

.notification-field__hint {
  color: var(--studio-text-soft);

  font-size: 0.63rem;
}

.notification-preview {
  padding: 17px;

  border: 1px solid var(--studio-border);
  border-radius: 12px;

  background: rgba(255, 255, 255, 0.018);
}

.notification-preview__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;

  margin-bottom: 12px;
}

.notification-preview__title {
  margin-bottom: 4px;

  font-size: 0.9rem;
}

.notification-preview__meta {
  color: var(--studio-text-soft);

  font-size: 0.63rem;
}

.notification-preview__message {
  margin-bottom: 0;

  color: var(--studio-text-muted);

  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.notification-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  padding: 18px 26px;

  border-top: 1px solid var(--studio-border);

  background: rgba(255, 255, 255, 0.014);
}

/*
============================================================
DETAILS
============================================================
*/

.notification-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;

  margin-bottom: 18px;
}

.notification-detail-card {
  padding: 14px;

  border: 1px solid var(--studio-border);
  border-radius: 10px;

  background: rgba(255, 255, 255, 0.018);
}

.notification-detail-card--full {
  grid-column: 1 / -1;
}

.notification-detail-card__label {
  display: block;

  margin-bottom: 4px;

  color: var(--studio-text-soft);

  font-size: 0.63rem;
  font-weight: 700;
}

.notification-detail-card__value {
  display: block;

  font-size: 0.75rem;
  font-weight: 720;
  word-break: break-word;
}

.notification-detail-message {
  padding: 16px;

  border: 1px solid var(--studio-border);
  border-radius: 11px;

  color: var(--studio-text-muted);
  background: rgba(255, 255, 255, 0.018);

  font-size: 0.73rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (max-width: 1250px) {
  .notification-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-toolbar__filters {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .notification-toolbar__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .notification-table-card {
    display: none;
  }

  .notification-mobile-list {
    display: block;
  }
}

@media (max-width: 620px) {
  .notification-summary-grid,
  .notification-toolbar__filters,
  .notification-mobile-card__grid,
  .notification-mobile-card__actions,
  .notification-form-grid,
  .notification-detail-grid {
    grid-template-columns: 1fr;
  }

  .notification-field--full,
  .notification-detail-card--full {
    grid-column: auto;
  }

  .notification-modal-backdrop {
    align-items: end;

    padding: 0;
  }

  .notification-modal {
    width: 100%;
    max-height: 94vh;

    border-right: none;
    border-bottom: none;
    border-left: none;
    border-radius: 22px 22px 0 0;
  }

  .notification-modal__body {
    max-height: calc(94vh - 190px);

    padding-right: 18px;
    padding-left: 18px;
  }

  .notification-modal__header,
  .notification-modal__footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .notification-modal__footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .notification-modal__footer .studio-button {
    width: 100%;
  }
}
