#rtec-check-in {
  display: block !important;
  position: relative;
}
.rtec-check-in-modal.rtec-modal {
  width: min(900px, calc(100vw - 20px));
  max-width: 900px;
  left: 50%;
  margin-left: 0;
  transform: translateX(-50%);
}
#rtec-check-in .rtec-input-wrapper,
.rtec-input-wrapper {
  position: relative;
  width: 450px;
  max-width: 100%;
}
#rtec-check-in input[type="text"],
#rtec-check-in input[type="email"],
#rtec-check-in input[type="tel"],
#rtec-check-in input[type="number"],
#rtec-check-in input[type="password"],
#rtec-check-in textarea,
.rtec-input[type="text"],
.rtec-input[type="email"],
.rtec-input[type="tel"],
.rtec-input[type="number"],
.rtec-input[type="password"],
.rtec-input[type="textarea"] {
  box-sizing: border-box;
  display: inline-block;
  float: none;
  padding: 8px;
  margin: 0;
  width: 100%;
  height: auto;
  font-size: 18px;
  line-height: 1.5;
  background: #fff;
  border: 1px solid #ddd;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
}
#rtec-check-in select,
.rtec-select {
  padding-left: 8px;
  height: auto;
  font-size: 18px;
  line-height: 1.5;
  background: #fff;
  border: 1px solid #ddd;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
}
#rtec-check-in option,
.rtec-option {
  padding: 8px;
  height: auto;
  font-size: 18px;
  line-height: 1.5;
}
#rtec-check-in input[type="number"],
.rtec-input[type="number"] {
  max-width: 100px;
}
#rtec-check-in .rtec-modal-content button,
.rtec-modal-content button {
  line-height: inherit;
  height: auto;
  margin: 0;
}
#rtec-check-in label,
.rtec-label {
  display: inline-block;
}
#rtec-check-in .rtec-checkbox-option-wrap label:hover,
#rtec-check-in .rtec-form-wrapper input[type=checkbox]:hover,
#rtec-check-in .rtec-form-wrapper input[type=radio]:hover,
#rtec-check-in .rtec-form-wrapper select:hover,
.rtec-checkbox-option-wrap label:hover,
.rtec-form-wrapper input[type=checkbox]:hover,
.rtec-form-wrapper input[type=radio]:hover,
.rtec-form-wrapper select:hover {
  cursor: pointer;
}
#rtec-check-in .rtec-checkbox-option-wrap,
.rtec-checkbox-option-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 10px;
  min-height: 1.5em;
}
#rtec-check-in .rtec-checkbox-option-wrap input {
  margin: 0;
  flex-shrink: 0;
}
#rtec-check-in .rtec-form-wrapper input {
  margin-right: 10px;
}
#rtec-check-in .rtec-form-buttons,
.rtec-form-buttons {
  text-align: center;
}
#rtec-check-in .rtec-custom-hover:hover,
.rtec-custom-hover:hover {
  opacity: .8;
}
#rtec-check-in .rtec-valid,
.rtec-valid {
  border: 1px solid rgb(20, 220, 70) !important;
}
#rtec-check-in .rtec-error,
.rtec-error {
  border: 1px solid #b91c1c !important;
}
#rtec-check-in .rtec-checkbox-option-wrap label,
.rtec-checkbox-option-wrap label {
  display: inline;
  vertical-align: middle;
  flex: 1 1 auto;
  min-width: 0;
}

#rtec-check-in .rtec-check-in-input,
#rtec-check-in .rtec-check-in-results,
.rtec-check-in-input,
.rtec-check-in-results {
  padding: 24px;
  max-width: 900px;
  margin: auto;
}
#rtec-check-in .rtec-check-in-input,
.rtec-check-in-input {
  padding: 30px 30px 0;
}
#rtec-check-in .rtec-check-in-list-item,
.rtec-check-in-list-item {
  display: flex;
  margin-bottom: 10px;
  min-height: 44px;
}
#rtec-check-in .rtec-cili-primary,
#rtec-check-in .rtec-check-in-status-inner,
.rtec-cili-primary,
.rtec-check-in-status-inner {
  display: flex;
  align-items: center;
  min-width: 100px;
}
#rtec-check-in .rtec-check-in-button,
#rtec-check-in .rtec-check-in-item,
.rtec-check-in-button,
.rtec-check-in-item {
  font-size: 16px;
  padding: 10px;
  line-height: 1.3;
  text-transform: inherit;
}
#rtec-check-in .rtec-check-in-item,
.rtec-check-in-item {
  display: inline-block;
}
#rtec-check-in .rtec-check-in-list-item:hover,
.rtec-check-in-list-item:hover {
  background: #eee;
}
#rtec-check-in .rtec-check-in-status svg,
.rtec-check-in-status svg {
  display: inline-block;
  height: 24px;
  color: #009688;
}
#rtec-check-in .rtec-check-in-status,
.rtec-check-in-status {
  width: 100px;
}

.rtec-modal-is-open #rtec-check-in .rtec-modal-close {
  display: block;
}
.rtec-modal-is-open #rtec-check-in .rtec-modal-close:hover {
  cursor: pointer;
}


/* Check for email duplicate */
#rtec-check-in .rtec-email-spinner img,
.rtec-email-spinner img {
  position: absolute;
  top: 11px;
  right: 11px;
  border-radius: 0;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  width: 24px;
  height: 24px;
}
#rtec-check-in .rtec-form-buttons .rtec-email-spinner,
.rtec-form-buttons .rtec-email-spinner {
  top: 50%;
  right: 50%;
  margin-top: -12px;
  margin-right: -12px;
}

#rtec-check-in .rtec-error-message,
.rtec-error-message {
  margin: 0.5em 0 0;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 0.9em;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 4px;
  border: 1px solid #fecaca;
}
#rtec-check-in .rtec-success-message,
.rtec-success-message {
  text-align: center;
}
.rtec-note {
  font-size: 13px;
  line-height: 1.2;
  display: block;
}

#rtec-check-in .rtec-spinner,
.rtec-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  margin-top: -20px;
  margin-left: -20px;
}

.rtec-modal-is-open .select2-drop-active {
  z-index: 161000;
  font-size: 16px;
}

/* Check-in container and events (doc 6.4) */
.rtec-admin-check-in-container {
  max-width: 1200px;
  margin: 0 auto;
}

.rtec-check-in-events {
  margin-bottom: 30px;
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.rtec-check-in-events h3,
.rtec-check-in-modal-content h3 {
  margin-top: 0;
  margin-bottom: 15px;
}

.rtec-check-in-modal-header {
  margin-bottom: 20px;
}

.rtec-check-in-modal-header h3 {
  margin: 0;
  margin-top: 15px;
}

.rtec-button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.rtec-button-primary {
  background-color: #0073aa;
  color: #fff;
}

.rtec-button-primary:hover:not(:disabled) {
  background-color: #005a87;
}

.rtec-button:disabled,
.rtec-button-disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  opacity: 0.65;
}

#rtec-check-in .rtec-button-primary:disabled {
  background-color: #a0a0a0;
  color: #fff;
}

.rtec-check-in-search-section {
  margin-bottom: 20px;
}

.rtec-registrants-section h3 {
  margin-bottom: 15px;
}

.rtec-attendance-counts-row {
  margin-bottom: 15px;
  font-size: 14px;
}

.rtec-attendance-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 1em 1.5em;
  padding: 0.5em 0;
  font-size: 14px;
}

.rtec-attendance-counts .rtec-count {
  white-space: nowrap;
}

.rtec-attendance-counts .rtec-count strong {
  margin-left: 0.15em;
}

.rtec-registrants-list {
  margin-top: 15px;
}

.rtec-registrants-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rtec-registrant-row {
  display: grid;
  grid-template-columns: 1fr minmax(min-content, max-content);
  gap: 20px;
  padding: 12px;
  border-bottom: 1px solid #E6E6E6;
  align-items: center;
}

.rtec-registrant-row:first-child {
  border-top: 1px solid #E6E6E6;
}

.rtec-registrant-row:hover {
  background-color: #f9f9f9;
}

.rtec-registrant-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.rtec-registrant-confirmation-code {
  font-size: 11px;
  font-style: italic;
  color: #666;
  margin-top: 4px;
}

.rtec-registrant-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  white-space: nowrap;
}

.rtec-registrant-actions > * {
  flex-shrink: 0;
  white-space: nowrap;
}

input.rtec-check-in-quantity {
  width: 60px;
  padding: 8px;
  margin-right: 10px;
}

.rtec-status-badge {
  display: inline-block;
  border-radius: 3px;
}

.rtec-status-display .rtec-status-badge {
  padding: 11px 10px;
  border: 1px solid;
}

.rtec-status-attended {
  color: #4AB674;
  background-color: #EAFCF1;
  border-color: #A8E5C0;
}

.rtec-status-noshow {
  color: #D37362;
  background-color: #FFF4F2;
  border-color: #EDC8C1;
}

.rtec-status-excused {
  color: #3781BA;
  background-color: #E8F4FD;
  border-color: #B8D5EB;
}

.rtec-status-unknown {
  background-color: #9e9e9e;
  color: #fff;
}

.rtec-status-item {
  padding: 12px 10px;
  min-width: 140px;
  text-align: center;
  line-height: 1;
  font-size: 16px;
}

.rtec-loading,
.rtec-no-results,
.rtec-error {
  padding: 20px;
  text-align: center;
  color: #666;
}

.rtec-error {
  color: #d32f2f;
}

.rtec-button-primary.rtec-check-in-btn {
  background-color: #4AB674;
  color: #fff;
}

.rtec-button-primary.rtec-check-in-btn:hover {
  background-color: #368D53;
}

.rtec-button-primary.rtec-check-in-btn:active {
  background-color: #265E3A;
}

.rtec-button-primary.rtec-check-in-btn:focus {
  background-color: #4AB674;
}

.rtec-status-display {
  display: inline-flex;
  align-items: center;
}

.rtec-check-in-list-and-search .rtec-form-field + .rtec-form-field {
  margin-top: 1em;
}

.rtec-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rtec-check-in-filter {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.rtec-check-in-options-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.rtec-check-in-options-btn {
  padding: 11px 12px;
  min-width: auto;
}

.rtec-check-in-options-btn .rtec-icon-text {
  font-size: 18px;
  line-height: 1;
}

.rtec-check-in-options-dropdown {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  border: 1px solid #CECECE;
  border-radius: 5px;
  padding: 8px 0;
  background: #F7F5F5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  min-width: 180px;
  z-index: 1000;
}

.rtec-check-in-options-dropdown a {
  display: block;
  padding: 10px 15px;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  text-decoration: none;
  transition: background-color 0.2s;
}

.rtec-check-in-options-dropdown a:hover {
  background-color: #e8e8e8;
  cursor: pointer;
}

.rtec-check-in-options-dropdown a:first-child {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.rtec-check-in-options-dropdown a:last-child {
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

@media (max-width: 768px) {
  .rtec-check-in-search,
  .rtec-check-in-select {
    max-width: 100%;
  }

  .rtec-registrant-row {
    padding: 8px;
    font-size: 12px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .rtec-registrant-actions {
    justify-content: flex-start;
  }
}
