/* ── Maxlab Resource Request Modal ── */

.rm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 14, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.rm-overlay.rm-open {
  opacity: 1;
  visibility: visible;
}

.rm-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.rm-overlay.rm-open .rm-modal {
  transform: translateY(0) scale(1);
}

.rm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.rm-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #EA2B16;
  padding: 5px 14px;
  border-radius: 100px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.rm-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}
.rm-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 20px;
  line-height: 1;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.rm-close:hover {
  background: #f5f5f5;
  color: #111;
  border-color: rgba(0, 0, 0, 0.15);
}

.rm-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px 8px;
}

.rm-title {
  font-size: 20px;
  font-weight: 800;
  color: #08080E;
  margin-bottom: 4px;
  line-height: 1.25;
}
.rm-resource {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #EA2B16;
  background: rgba(234, 43, 22, 0.08);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}
.rm-sub {
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
  line-height: 1.5;
}

.rm-field { margin-bottom: 14px; }
.rm-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}
.rm-label-opt {
  font-weight: 400;
  color: #bbb;
  font-size: 12px;
}
.rm-input,
.rm-textarea {
  width: 100%;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  outline: none;
  transition: border-color 0.18s;
  box-sizing: border-box;
}
.rm-textarea {
  min-height: 80px;
  resize: vertical;
  font-size: 13px;
  border-radius: 12px;
}
.rm-input:focus,
.rm-textarea:focus { border-color: #EA2B16; }
.rm-input.rm-error,
.rm-textarea.rm-error { border-color: #DC2626; }
.rm-err-msg {
  font-size: 11px;
  color: #DC2626;
  margin-top: 4px;
  font-weight: 500;
  display: none;
}
.rm-err-msg.show { display: block; }
.rm-submit-error {
  display: none;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.06);
  color: #B91C1C;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
.rm-submit-error.show { display: block; }

.rm-footer {
  padding: 14px 24px 22px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
  gap: 12px;
}
.rm-submit-btn {
  background: #EA2B16;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 13px 30px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: opacity 0.18s, transform 0.15s;
  white-space: nowrap;
}
.rm-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.rm-submit-btn:not(:disabled):hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* Confirmation */
.rm-confirm {
  text-align: center;
  padding: 12px 0 16px;
  display: none;
}
.rm-confirm.show { display: block; }
.rm-form.hide { display: none; }

.rm-confirm-icon {
  width: 58px;
  height: 58px;
  background: rgba(22, 163, 74, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.rm-confirm-icon svg {
  width: 26px;
  height: 26px;
  stroke: #16a34a;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rm-confirm-title {
  font-size: 22px;
  font-weight: 800;
  color: #08080E;
  margin-bottom: 8px;
}
.rm-confirm-sub {
  font-size: 14px;
  color: #888;
  margin-bottom: 20px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.rm-confirm-disclaimer {
  margin-top: 4px;
  background: #f7f7fa;
  border: 1px solid #ececf2;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12.5px;
  color: #666;
  line-height: 1.55;
  text-align: left;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.rm-confirm-disclaimer strong {
  color: #08080E;
  font-weight: 700;
}

/* Mobile */
@media (max-width: 600px) {
  .rm-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .rm-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }
}
