* {
  box-sizing: border-box;
  margin: 0px;
  padding: 0px;
  font-family: "Yekan Bakh FaNum", system-ui, sans-serif;
}

button:disabled {
  cursor: not-allowed;
}

p {
  margin: 0;
  text-align: start;
}

.session-info-wrapper {
  position: relative;
  margin-top: -48px; /* 👈 negative margin from top */
  padding: 0 16px;
}

.session-info-card {
  background: #ffffff;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  padding: 16px 24px;
  max-width: 960px;
  margin: 0 auto;
}

/* desktop layout */
.session-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.session-info-item {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.label {
  color: #7d8285;
  font-size: 14px;
}

.value {
  color: #333333;
  font-size: 16px;
  font-weight: 500;
}

.back-btn {
  margin-right: auto;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1.5px solid #3b82f6;
  background: #fff;
  color: #2563eb;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.back-btn:hover {
  background: #eff6ff;
}

.table-container {
  margin: 0 auto;
  max-width: 1280px;
  padding-inline: 16px;
}

.table-wrapper {
  background: #fff;
  margin-top: 16px;
  border: 1px solid #d4d4d4;
  border-radius: 12px;
  overflow: hidden;
}

.responsive-table {
  font-size: 14px;
  width: 100%;
  border-collapse: collapse;
}

.responsive-table thead {
  background: #f1f3f5;
}

.responsive-table th,
.responsive-table td {
  padding: 14px 16px;
  text-align: right;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.responsive-table th {
  font-weight: 600;
  color: #555;
}

@media (min-width: 769px) {
  .table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .responsive-table {
    min-width: 1200px;
  }
}

.status-select {
  appearance: none;
  padding: 8px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: left 4px center;
  background-size: 24px;
  min-width: 120px;
}

.status-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M15.5286 9.52876C15.789 9.26841 16.211 9.26841 16.4713 9.52876C16.7316 9.78911 16.7317 10.2111 16.4713 10.4715L12.4713 14.4715C12.211 14.7318 11.789 14.7318 11.5286 14.4715L7.52864 10.4715C7.26829 10.2111 7.26829 9.78911 7.52864 9.52876C7.78899 9.26841 8.21099 9.26841 8.47134 9.52876L12 13.0574L15.5286 9.52876Z' fill='%23171717'/%3E%3C/svg%3E");
}

/* Draft */
.status-select[data-status="draft"] {
  background-color: #eef1f4;
  color: #555;
  border-color: #dde2e7;
}

/* Public */
.status-select[data-status="public"] {
  background-color: #d7ffd7;
  color: #2a702a;
}

.status-select:focus {
  outline: none;
}

.date-time {
  display: flex;
  align-items: center;
  gap: 16px;
}

.date-time span {
  font-weight: 500;
}

.actions {
  display: flex;
  align-items: center;
}

.actions button {
  display: flex;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
}

.actions .view {
  color: #2563eb;
  padding: 8px 0px;
  margin-left: 16px;
}

.actions .edit {
  color: #2563eb;
}

.actions .delete {
  color: #dc2626;
}

/* overlay */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999;
}

.modal.active {
  display: block;
}

.c-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

/* panel */
.modal-panel {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 492px;
  margin: 20vh auto;
  border-radius: 16px;
  padding: 16px 24px;
  z-index: 2;
  animation: fadeUp 0.25s ease;
}

/* content */
.c-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #d4d4d4;
  margin-bottom: 16px;
}
.c-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #333333;
}

.modal-desc {
  font-size: 18px;
  color: #333333;
  font-weight: 500;
  text-align: right;
  margin-bottom: 16px;
}

.modal-box {
  background: #f7f8fc;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 26px;
}

.ai-template-modal .modal-panel {
  margin-top: 16vh;
}

.ai-template-modal .modal-close {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  line-height: 0;
}

.ai-template-box {
  display: block;
  padding: 14px;
}

.ai-template-box .label {
  display: block;
  margin-bottom: 8px;
}

.ai-template-box select {
  width: 100%;
  height: 48px;
  border: 1px solid #ccd3df;
  border-radius: 8px;
  background: #fff;
  color: #333333;
  font-size: 15px;
  padding: 0 12px;
  outline: none;
}

.ai-template-box select:focus {
  border-color: #3157dc;
  box-shadow: 0 0 0 3px rgba(49, 87, 220, 0.12);
}

.modal-box > div {
  display: flex;
  place-items: center;
  justify-content: space-between;
}

.modal-box .first {
  align-items: end;
}

.modal-box .second {
  margin-left: 30px;
}

.modal-hr {
  border: none;
  background-color: #eaebef;
  height: 1px;
  margin-block: 16px;
}

#edit-session .modal-actions {
  margin-top: 70px;
}

.pill {
  padding: 4px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.pill.green {
  background: #d7ffd7;
  color: #2a702a;
}

/* actions */
.modal-actions {
  display: flex;
  gap: 12px;
}

.c-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
}

.c-btn.ghost {
  background: #fff;
  color: #777777;
  border-color: #777777;
}

.c-btn.danger {
  background: #ea2b2b;
  color: white;
}

.c-btn.primary {
  background-color: #3157dc;
  color: white;
}

.input-wrapper {
  background-color: #ffffff;
  border: 1px solid #ccd3df;
  padding-inline-end: 12px;
  border-radius: 8px;
  height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.input-wrapper input {
  font-size: 16px;
  width: 100%;
  height: 100%;
  padding: 12px;
  color: #333333;
}

.input-action {
  cursor: pointer;
}

/* Mobile layout */
@media (max-width: 768px) {
  .session-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .session-info-wrapper {
    margin-top: -32px;
  }

  .session-info-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .session-info-card a {
    grid-column: 1 / -1;
    width: 100%;
  }
  .back-btn {
    width: 100%;
  }
  .table-wrapper {
    border: none;
  }
  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
  }

  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border: none;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #666;
    margin-left: 12px;
    white-space: nowrap;
  }

  .actions {
    justify-content: flex-start;
  }
  .actions .view {
    padding: 8px 0px;
    padding-inline-end: 0px;
    margin-left: 12px;
  }
  .modal-panel {
    position: absolute;
    bottom: 0;
    margin: 0;
    max-width: none;
    border-radius: 16px 16px 0 0;
    animation: slideUp 0.25s ease;
  }
}

/* animations */
@keyframes fadeUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
}
