:root {
  --oa-bg: #f7f7f8;
  --oa-card: #ffffff;
  --oa-text: #1f2937;
  --oa-muted: #6b7280;
  --oa-border: #676673;
  --oa-accent: #4787bb;
  --oa-success: #16a34a;
  --oa-warning: #f59e0b;
  --oa-danger: #dc2626;
  --oa-headTable: #f0ede6;
  --oa-borderTable: #efefef;
  --oa-radius: 6px;
}

.events-section,
.participants-section {
  box-sizing: border-box;
  min-width: 0;
  margin: 20px 0;
}
.certi_img_print {
  display: inline-block;
  padding-left: 10px;
  width: 16px;
  height: 16px;
  background-image: url("../img/print.svg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 16px 16px;
  vertical-align: middle;
  cursor: pointer;
}
.certi_img_send {
  display: inline-block;
  padding-left: 10px;
  width: 16px;
  height: 16px;
  background-image: url("../img/send_email.gif");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 16px 16px;
  vertical-align: middle;
  cursor: pointer;
}

.events-participants-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}
.events-section {
  flex: 1 1 0;
}

.participants-section {
  flex: 1 1 0;
  padding: 18px;
  background-color: #f6f8fb;
  border: 1px solid #cbd6e2;
  border-radius: var(--oa-radius);
}

.events-section h2,
.participants-section h2 {
  margin: 0 0 12px;
  color: #26364a;
  font-size: 20px;
}

.participants-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}

.selected-event-name {
  color: #526579;
  font-size: 14px;
  font-weight: bold;
}

#eventsGridNode,
#participantsGridNode {
  width: 100%;
  min-width: 0;
}

.loading,
.empty-message {
  box-sizing: border-box;
  margin: 10px 0;
  padding: 14px;
  text-align: center;
  border-radius: var(--oa-radius);
}

.loading {
  color: #315d8a;
  background: #e9f3fc;
  border: 1px solid #aac9e4;
}

.empty-message {
  color: #5d6873;
  background: #fff;
  border: 1px dashed #b8c2cc;
}

.is-loading {
  opacity: 0.45;
  pointer-events: none;
}
.is-hidden {
  display: none !important;
}

.participants-detail-button {
  padding: 5px 10px;
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  background: #3975a8;
  border: 1px solid #285b86;
  border-radius: 3px;
}

.participants-detail-button:hover {
  background: #285f8d;
}
.participants-detail-button:focus {
  outline: 2px solid #82b8e5;
  outline-offset: 1px;
}

.status {
  display: inline-block;
  padding: 1px 5px;
  border-radius: var(--oa-radius);
  border: 1px solid transparent;
}
.status-paid {
  background: #319531;
  color: #ffffff;
  border-color: #2f7f2f;
}
.status-unpaid {
  background: #bb4747;
  color: #ffffff;
  border-color: #963636;
}

.oa-email {
  position: fixed;
  top: 0;
  left: 0;
  border: 1px dashed var(--oa-border);
  border-radius: var(--oa-radius);
  padding: 16px;
  color: #111827;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.oa-email-dialog {
  position: relative;
  background: #fff;
  width: min(526px, 96vw);
  max-height: 92vh;
  border-radius: var(--oa-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}
.oa-email-body {
  padding: 12px;
  overflow: hidden;
}
.oa-email-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.oa-email.open {
  display: flex !important;
}
.oa-email-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--oa-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.oa-email table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.oa-email th,
.oa-email td {
  padding: 6px;
  border-bottom: 1px solid var(--oa-border);
  text-align: left;
}
.oa-email-editor {
  min-height: 200px;
  border: 1px solid #ccc;
  padding: 10px;
  overflow-y: auto;
}
.oa-form label {
  display: block;
  color: var(--oa-muted);
  margin: 8px 0 4px;
}
.oa-form input,
.oa-form select,
.oa-form textarea {
  width: 93%;
  padding: 8px 10px;
  border: 1px solid var(--oa-border);
  border-radius: var(--oa-radius);
}
.oa-form .oa-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.oa-errors {
  color: var(--oa-danger);
  margin-top: 6px;
}
.oa-email-footer,
.oa-email-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--oa-border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Zvýraznění řádku vybrané akce */
.events-section .dojoxGridRowSelected .dojoxGridCell {
  background-color: #dbeaf6 !important;
}

.participants-toolbar .send-all-button .dijitButtonNode {
  border-color: #bf7a36;
  background: #fff4e8;
}

/* Rozumná minimální výška při načítání */
#participantsGridNode {
  min-height: 80px;
}

.section-warning {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-sizing: border-box;
  max-width: 760px;
  margin: 24px auto;
  padding: 20px;
  color: #663c00;
  background-color: #fff8e5;
  border: 1px solid #e2ad35;
  border-left: 5px solid #d99000;
  border-radius: var(--oa-radius);
}

.section-warning__icon {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  background-color: #d99000;
  border-radius: 50%;
}

.section-warning__content {
  flex: 1;
}

.section-warning__title {
  margin: 0 0 8px;
  color: #663c00;
  font-size: 18px;
  line-height: 1.3;
}

.section-warning__text {
  margin: 0 0 16px;
  line-height: 1.5;
}

.section-warning__button {
  display: inline-block;
  padding: 8px 14px;

  color: #fff;
  font-weight: bold;
  text-decoration: none;

  background-color: #3975a8;
  border: 1px solid #285b86;
  border-radius: var(--oa-radius);
}

.section-warning__button:hover,
.section-warning__button:focus {
  color: #fff;
  background-color: #285b86;
  text-decoration: none;
}

.participants-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;

  margin: 0 0 10px 0;
  padding: 8px 10px;

  background: #f3f6fa;
  border: 1px solid #c5ced8;
  border-radius: var(--oa-radius);
}

.participants-toolbar #selectedParticipantsCount {
  margin-right: auto;
  color: #44505c;
  font-weight: 600;
  white-space: nowrap;
}

.template-selection-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}

#templatePreview {
  display: none;
  width: 420px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 8px;
  padding: 12px;
  color: #222;
  background: #fff;
  border: 1px solid #999;
  border-radius: 5px;
  white-space: pre-wrap;
}

.template-preview.is-visible {
  display: block;
}

.oa-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.oa-modal-content {
  background: #fff;
  padding: 15px;
  border-radius: var(--oa-radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  background-color: #fff;
  border: 3px solid #777;
  text-align: center;
  width: 300px;
}

/* Informace */
.oa-modal.oa-info .oa-modal-content {
  border-color: var(--oa-accent);
  background-color: #eef7fd;
}

/* Upozornění */
.oa-modal.oa-warning .oa-modal-content {
  border-color: var(--oa-warning);
  background-color: #fff8df;
}

/* Chyba */
.oa-modal.oa-error .oa-modal-content {
  border-color: var(--oa-danger);
  background-color: #fff0f0;
}

.oa-modal-button {
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
}

.oa-modal-button:hover {
  transform: scale(1.05);
}

.oa_confirm {
  background-color: #28a745;
  color: white;
}

.oa_confirm:hover {
  background-color: #218838;
}

@media (max-width: 1000px) {
  .events-participants-layout {
    flex-direction: column;
  }
  .events-section,
  .participants-section {
    flex: none;
    width: 100%;
    margin: 10px 0;
  }
}

@media (max-width: 600px) {
  .section-warning {
    margin: 16px 8px;
    padding: 16px;
  }
  .section-warning__icon {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    font-size: 19px;
  }
  .participants-toolbar {
    flex-wrap: wrap;
  }
  .participants-toolbar #selectedParticipantsCount {
    width: 100%;
    margin-right: 0;
  }
}
