/* rom-styles.css - responsive cards layout, counter scroller hint, DM Sans */

.rom-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px;
  box-sizing: border-box;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #173a36;
}

.rom-title {
  text-align: center;
  margin: 6px 0 16px;
  font-size: 20px;
  color: #0d7a73;
  font-weight: 700;
}

/* Counters wrapper */
.rom-counters-wrap {
  position: relative;
  margin-bottom: 12px;
}

.rom-counters {
  display: flex;
  gap: 14px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  box-sizing: border-box;
  white-space: nowrap;
}

.rom-counter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(3, 60, 60, 0.04);
}

.rom-counter strong {
  font-size: 16px;
  color: #0d7a73;
  display: block;
}

.rom-counter-label {
  font-size: 12px;
  color: #476462;
  margin-top: 4px;
}

/* scroll hint (indicator) */
.rom-counters-indicator {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.8));
  padding: 6px 8px;
  border-radius: 20px;
  font-size: 13px;
  color: #0d7a73;
  display: none;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(3, 60, 60, 0.06);
}

.rom-counters-wrap.scrolling .rom-counters-indicator {
  display: block;
}

/* Filters / search */
.rom-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.rom-primary-filter {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #dfeeea;
  background: #fff;
  font-weight: 600;
}

.rom-user-search-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
}

.rom-user-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #dfeeea;
  min-width: 260px;
  max-width: 420px;
  box-sizing: border-box;
}

.rom-user-toggle {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #dfeeea;
  background: #fff;
  cursor: pointer;
}

/* suggestions */
.rom-user-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  max-width: 520px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(3,60,60,0.08);
  max-height: 300px;
  overflow: auto;
  z-index: 9999;
  display: none;
  padding: 6px;
  box-sizing: border-box;
}

.rom-user-suggestions.open {
  display: block;
}

.rom-user-suggestion {
  padding: 8px 10px;
  border-radius: 8px;
  margin: 4px 0;
  cursor: pointer;
  font-size: 13px;
  color: #083434;
  word-break: break-word;
  background: transparent;
}

.rom-user-suggestion:hover,
.rom-user-suggestion:focus {
  background: #0d7a73;
  color: #fff;
}

/* export */
.tutor-profiles-export,
#rom_export_btn {
  padding: 8px 12px;
  border-radius: 8px;
  background: #0d7a73;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

/* profile details */
#rom_profile_details {
  margin-top: 12px;
  border: 1px solid #e6f3f1;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

#rom_profile_details table {
  width: 100%;
  border-collapse: collapse;
}

#rom_profile_details th {
  text-align: left;
  padding: 8px;
  width: 34%;
  vertical-align: top;
  font-weight: 700;
  color: #0d7a73;
  background: transparent;
}

#rom_profile_details td {
  padding: 8px;
  word-wrap: break-word;
  white-space: normal;
  color: #000;
}

/* Orders box - removed teal outline as requested */
.rom-orders-box {
  width: 100%;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(3,60,60,0.04);
  box-sizing: border-box;
}

/* Orders list as responsive grid of cards (two columns on larger screens) */
.rom-orders-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rom-orders-empty {
  padding: 22px;
  text-align: center;
  color: #666;
}

/* Order card */
.rom-order-card {
  border: 1px solid #e9f3f2;
  border-radius: 12px;
  padding: 12px;
  box-sizing: border-box;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: 120px;
}

.rom-order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.rom-order-id {
  font-weight: 700;
  color: #0d7a73;
}

.rom-order-date {
  font-size: 12px;
  color: #476462;
}

/* Grid rows in card: two-column layout label/value */
.rom-order-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  align-items: start;
}

.rom-order-row {
  display: flex;
  flex-direction: column;
}

.rom-order-label {
  font-size: 12px;
  color: #0d7a73;
  font-weight: 600;
  margin-bottom: 4px;
}

.rom-order-value {
  font-size: 13px;
  color: #0b5d57;
  word-break: break-word;
}

/* Actions area */
.rom-order-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.rom-action-btn {
  display: inline-block;
}

.tutor-profiles-btn,
.rom-action-btn button,
.rom-action-btn a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  background: linear-gradient(180deg, #14a69e 0%, #0d7a73 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* Modal */
.rom-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6vh;
  box-sizing: border-box;
  overflow: auto;
}

.rom-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7,40,38,0.55);
}

.rom-modal-inner {
  position: relative;
  width: 760px;
  max-width: 95%;
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(7,40,38,0.3);
  z-index: 100000;
  max-height: calc(100vh - 80px);
  overflow: auto;
  box-sizing: border-box;
}

/* Responsive behavior */
@media (max-width: 980px) {
  .rom-orders-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .rom-user-input {
    max-width: 60vw;
  }
}

/* IMPORTANT: hide the counters row on smaller devices
   Counters will be visible on widths >= 1024px only. */
@media (max-width: 1023px) {
  .rom-counters-wrap {
    display: none !important;
  }
  .rom-filters {
    justify-content: center;
  }
}

/* Mobile specific layout */
@media (max-width: 640px) {
  .rom-orders-list {
    grid-template-columns: 1fr;
  }
  .rom-user-search {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .rom-user-suggestions {
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 520px;
  }
  .rom-counters {
    gap: 10px;
  }
  .rom-counters-indicator {
    right: 6px;
  }
}
