/* ============================================================
   popup-form.css -- Academy of Russian Ballet Modal Forms
   Reusable overlay/box styling for click-triggered popup forms
   (multiple forms can share this file; each modal has its own
   #arb-modal-<name> id)
   ============================================================ */

/* --- Overlay backdrop --- */
.arb-modal-overlay {
  display         : none;          /* shown by JS */
  position        : fixed;
  inset           : 0;
  background      : rgba(0, 0, 0, 0.75);
  z-index         : 99990;
  align-items     : flex-start;
  justify-content : center;
  overflow-y      : auto;
  padding         : 40px 20px;

  /* Fade-in animation */
  opacity         : 0;
  transition      : opacity 0.3s ease;
}

/* Active state — JS adds this class to show the popup */
.arb-modal-overlay.arb-modal-visible {
  display         : flex;
  opacity         : 1;
}

/* --- Popup box --- */
.arb-modal-box {
  position        : relative;
  max-width       : 760px;
  width           : calc(100% - 40px);
  background      : #fff;
  border-radius   : 10px;
  padding         : 30px 30px 25px;
  box-shadow      : 0 12px 48px rgba(0, 0, 0, 0.5);

  /* Subtle scale-up entrance */
  transform       : scale(0.94);
  transition      : transform 0.3s ease;
}

.arb-modal-overlay.arb-modal-visible .arb-modal-box {
  transform       : scale(1);
}

.arb-modal-box h3 {
  margin-top      : 0;
  margin-bottom   : 4px;
  text-align      : center;
}

.arb-modal-subtitle {
  font-weight     : 600;
  font-size       : 15px;
  margin-top      : 0;
  margin-bottom   : 18px;
}

.arb-modal-intro {
  font-size       : 14px;
  line-height     : 1.5;
  margin-bottom   : 20px;
}

/* --- Close button --- */
.arb-modal-close {
  position        : absolute;
  top             : -13px;
  right           : -13px;
  width           : 32px;
  height          : 32px;
  background      : #7502C3;
  color           : #fff;
  border          : none;
  border-radius   : 50%;
  font-size       : 16px;
  line-height     : 1;
  cursor          : pointer;
  z-index         : 99999;
  display         : flex;
  align-items     : center;
  justify-content : center;
  box-shadow      : 0 2px 6px rgba(0, 0, 0, 0.35);
  transition      : background 0.2s, transform 0.15s;
}

.arb-modal-close:hover {
  background      : #5a00a0;
  transform       : scale(1.1);
}

/* --- Form layout helpers --- */
.arb-modal-box .form-group {
  margin-bottom   : 14px;
}

.arb-modal-box label {
  display         : block;
  font-size       : 13px;
  font-weight     : 600;
  margin-bottom   : 4px;
}

.arb-modal-box .form-control {
  width           : 100%;
  padding         : 8px 10px;
  border          : 1px solid #ccc;
  border-radius   : 4px;
  font-size       : 14px;
  box-sizing      : border-box;
}

.arb-modal-box .form-row {
  display         : flex;
  gap             : 12px;
  flex-wrap       : wrap;
}

.arb-modal-box .form-row .form-group {
  flex            : 1 1 200px;
}

.arb-modal-box .radio-inline {
  display         : inline-flex;
  align-items     : center;
  gap             : 6px;
  margin-right    : 16px;
  font-weight     : normal;
  font-size       : 14px;
}

.arb-modal-box .class-row-block {
  border          : 1px solid #e0e0e0;
  border-radius   : 6px;
  padding         : 14px;
  margin-bottom   : 16px;
  background      : #fafafa;
}

.arb-modal-box .class-row-block h4 {
  margin          : 0 0 10px;
  font-size       : 14px;
  color           : #7502C3;
}

/* --- "Add another row" button --- */
.arb-modal-add-row {
  background      : #fff;
  color           : #7502C3;
  border          : 1px dashed #7502C3;
  border-radius   : 6px;
  padding         : 8px 18px;
  font-size       : 14px;
  cursor          : pointer;
  transition      : background 0.2s;
}

.arb-modal-add-row:hover {
  background      : #f5ebfb;
}

.arb-modal-add-row:disabled {
  opacity         : 0.5;
  cursor          : default;
  border-style    : solid;
}

/* --- Trigger link/button while its modal is being fetched --- */
.arb-modal-trigger-loading {
  opacity         : 0.6;
  cursor          : wait;
  pointer-events  : none;
}

/* Honeypot field -- hidden from real users */
.arb-modal-box .arb-hp-field {
  position        : absolute;
  left             : -9999px;
  width            : 1px;
  height           : 1px;
  overflow         : hidden;
}

/* --- Live clock (shown above Submit) --- */
.arb-modal-live-clock {
  font-size       : 13px;
  color           : #555;
  margin-bottom   : 10px;
}

.arb-modal-live-clock [data-live-clock-value] {
  font-variant-numeric: tabular-nums;
  font-weight     : 600;
}

/* --- Submit button --- */
.arb-modal-submit {
  background      : #7502C3;
  color           : #fff;
  border          : none;
  border-radius   : 6px;
  padding         : 10px 24px;
  font-size       : 15px;
  cursor          : pointer;
  transition      : background 0.2s;
}

.arb-modal-submit:hover {
  background      : #5a00a0;
}

.arb-modal-submit:disabled {
  opacity         : 0.6;
  cursor          : default;
}

/* --- Status message --- */
.arb-modal-status {
  margin-top      : 14px;
  padding         : 10px 12px;
  border-radius   : 5px;
  font-size       : 14px;
  display         : none;
}

.arb-modal-status.arb-status-success {
  display         : block;
  background      : #e6f6ea;
  color           : #1e7e34;
  border          : 1px solid #b6e6c2;
}

.arb-modal-status.arb-status-error {
  display         : block;
  background      : #fdecea;
  color           : #a12622;
  border          : 1px solid #f5c6c3;
}
