/* Table Component */
.fluent-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 2px;
}

.fluent-table thead {
  background-color: var(--table-header-bg);
  border-bottom: 1px solid var(--border-color);
}

.fluent-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
  user-select: none;
}

.fluent-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.fluent-table tr:hover {
  background-color: var(--row-hover);
}

.fluent-table tr.selected {
  background-color: var(--selection-bg);
}

.fluent-table tr.selected td {
  border-left: 3px solid var(--primary-blue);
  padding-left: 9px;
}

/* Waffle Menu Component */
.waffle-menu {
  position: absolute;
  top: 48px;
  left: 0;
  width: 320px;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: none;
  z-index: 2000;
  padding: 16px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.waffle-menu.show {
  display: block;
}

.waffle-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-main);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-main);
  transition: background-color 0.2s;
}

.app-item:hover {
  background-color: var(--row-hover);
}

.app-icon {
  width: 32px;
  height: 32px;
  background-color: #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.app-name {
  font-size: 12px;
  text-align: center;
}

/* Flyout Component (Slide-out Panel) */
.flyout {
  position: fixed;
  top: 0;
  right: -450px; /* Hidden initially */
  width: 450px;
  height: 100vh;
  background-color: white;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  z-index: 3000;
  transition: right 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.flyout.wide {
  width: 580px;
  right: -580px;
}

.flyout.show {
  right: 0;
}

.flyout-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flyout-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.flyout-close {
  cursor: pointer;
  font-size: 20px;
  color: #605e5d;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color var(--transition-speed);
}

.flyout-close:hover {
  background-color: var(--row-hover);
}

.flyout-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.flyout-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  background-color: #f3f2f1;
}

/* Common UI Elements */
.fluent-button {
  height: 32px;
  padding: 0 16px;
  border-radius: 4px;
  font-weight: 400;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.fluent-button.primary {
  background-color: var(--primary-blue);
  color: white;
  border: 1px solid transparent;
}

.fluent-button.primary:hover {
  background-color: var(--primary-blue-hover);
}

.fluent-button.secondary {
  border: 1px solid #8a8886;
  background-color: white;
  color: var(--text-main);
}

.fluent-button.secondary:hover {
  background-color: var(--row-hover);
  border-color: #323130;
}

.fluent-button:disabled {
  background-color: #f3f2f1;
  border-color: #e1dfdd;
  color: #a19f9d;
  cursor: not-allowed;
}

.fluent-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-delivered { background-color: #dff6dd; color: #107c10; }
.badge-failed { background-color: #fde7e9; color: #a4262c; }
.badge-quarantined { background-color: #fff4ce; color: #797775; }
.badge-junk { background-color: #f3f2f1; color: #605e5d; }

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  z-index: 1500;
  display: none;
}

.overlay.show {
  display: block;
}

/* Notice Banner */
.notice-banner {
  background-color: #fffdf0;
  border: 1px solid #fde7e9;
  border-left: 4px solid #f7a226;
  border-radius: 2px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--text-main);
}

.notice-banner .banner-icon {
  color: #f7a226;
  font-size: 16px;
  margin-top: 1px;
}

.notice-banner a {
  color: var(--primary-blue);
  text-decoration: none;
}

.notice-banner a:hover {
  text-decoration: underline;
}

/* Custom form and search fields */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.info-icon {
  font-size: 14px;
  color: #0078d4;
  cursor: pointer;
}

.form-input {
  width: 100%;
  height: 32px;
  border: 1px solid #8a8886;
  border-radius: 4px;
  padding: 0 12px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 1px var(--primary-blue);
}

/* Flex row for date time inputs */
.datetime-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.datetime-input-container {
  position: relative;
  flex: 1;
}

.datetime-input-container .input-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #605e5d;
  pointer-events: none;
  font-size: 16px;
}

/* Detailed Search Header */
.collapsible-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
  cursor: pointer;
  user-select: none;
}

.collapsible-section-header .chevron {
  font-size: 18px;
  color: #605e5d;
  transition: transform 0.2s;
}

.collapsible-section-header.collapsed .chevron {
  transform: rotate(-180deg);
}

.collapsible-section-content {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.collapsible-section-content.collapsed {
  max-height: 0 !important;
}

/* Radio buttons list */
.radio-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.radio-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.radio-item input[type="radio"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--primary-blue);
}

.radio-label-container {
  display: flex;
  flex-direction: column;
}

.radio-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.radio-subtext {
  font-size: 11px;
  color: #605e5d;
  margin-top: 2px;
}
