/* ==========================================================================
   WooPW — Patient Prescription Upload Form
   ========================================================================== */

.woopw-rx-wrap {
  --rx-primary:      var(--theme-primary-color, #2c6fad);
  --rx-success:      #2e7d32;
  --rx-success-bg:   #f0faf0;
  --rx-error:        #c62828;
  --rx-error-bg:     #fff5f5;
  --rx-border:       rgba(255,255,255,.15);
  --rx-border-input: rgba(255,255,255,.25);
  --rx-radius:       10px;
  --rx-radius-sm:    6px;
  --rx-shadow:       0 4px 24px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.1);
  --rx-section-gap:  2rem;
  --rx-field-gap:    1.25rem;
  --rx-transition:   0.18s ease;

  max-width: 800px;
  margin: 0 auto;
  font-family: inherit;
}

/* ── Card ── */
.woopw-rx-card {
  background: var(--bg-theme-gradient-color-2, rgba(255, 255, 255, .05));
  border-radius: var(--rx-radius);
  box-shadow: var(--rx-shadow);
  overflow: hidden;
}

/* ── Card Header ── */
.woopw-rx-card__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.75rem 2rem;
  background: var(--bg-theme-gradient-color-1);
  border-bottom: 1px solid var(--rx-border);
}

.woopw-rx-card__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: #fff;
  margin-top: 2px;
}

.woopw-rx-card__title {
  margin: 0 0 .3rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.woopw-rx-card__subtitle {
  margin: 0;
  font-size: .9rem;
 color: #ffffff;
  opacity: .7;
  line-height: 1.5;
}

/* ── Error Banner ── */
.woopw-rx-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.5rem 2rem 0;
  padding: .875rem 1rem;
  border-radius: var(--rx-radius-sm);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.4;
}

.woopw-rx-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.woopw-rx-banner--error {
  background: var(--rx-error-bg);
  border: 1px solid #f5c6c6;
  color: var(--rx-error);
}

/* ── Form Padding ── */
#woopw-patient-prescription-form {
  padding: 1.75rem 2rem 2rem;
}

/* ── Section ── */
.woopw-rx-section {
  padding-bottom: var(--rx-section-gap);
}

.woopw-rx-section--last {
  border-bottom: none;
  margin-bottom: 0;
}
.woopw-rx-section__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--theme-text-color, #ffffff);
  letter-spacing: .01em;
}

.woopw-rx-section__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--theme-primary-color, #2c6fad);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.woopw-rx-section__optional {
  font-size: .8rem;
  font-weight: 400;
  color: var(--theme-text-color, #ffffff);
  opacity: .5;
}

/* ── Grid ── */
.woopw-rx-grid {
  display: grid;
  gap: var(--rx-field-gap);
}

.woopw-rx-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.woopw-rx-field--span2 {
  grid-column: 1 / -1;
}

/* ── Field ── */
.woopw-rx-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

/* ── Label ── */
.woopw-rx-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--theme-text-color, #ffffff);
  line-height: 1.4;
}

.woopw-rx-required {
  color: #ff6b6b;
  margin-left: 2px;
}

.woopw-rx-optional {
  font-size: .78rem;
  font-weight: 400;
  color: var(--theme-text-color, #ffffff);
  opacity: .5;
  margin-left: .25rem;
}

/* ── Input / Select / Textarea ── */
.woopw-rx-input {
  width: 100%;
  padding: .65rem .875rem;
  border: 1.5px solid var(--rx-border-input);
  border-radius: var(--rx-radius-sm);
  font-size: .95rem;
  color: var(--theme-text-color, #ffffff);
  line-height: 1.5;
  transition: border-color var(--rx-transition), box-shadow var(--rx-transition), background var(--rx-transition);
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.woopw-rx-input::placeholder {
  color: var(--theme-text-color, #ffffff);
  opacity: .35;
}

.woopw-rx-input:focus {
  outline: none;
  border-color: var(--theme-primary-color, #2c6fad);
  box-shadow: 0 0 0 3px rgba(44, 111, 173, .25);

}

.woopw-rx-input.is-invalid {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, .15);
}

.woopw-rx-input.is-valid {
  border-color: #4caf50;
}

/* Locked patient address fields when a separate postal address is entered */
.woopw-rx-field--locked .woopw-rx-input[readonly] {
  cursor: not-allowed;
  opacity: .75;
}

.woopw-rx-field--locked .woopw-rx-label::after {
  content: ' (locked)';
  font-size: .75rem;
  color: #888;
  font-weight: 400;
}

/* Date input calendar icon color fix */
.woopw-rx-input[type="date"]::-webkit-calendar-picker-indicator {
  filter: opacity(.55);
  cursor: pointer;
}

.woopw-rx-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ── Select Wrapper ── */
.woopw-rx-select-wrap {
  position: relative;
}

.woopw-rx-select-wrap .woopw-rx-select {
  padding-right: 2.5rem;
  cursor: pointer;
}

.woopw-rx-select-wrap .woopw-rx-select option {
  color: var(--theme-text-color);
}

.woopw-rx-select-arrow {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  color: var(--theme-text-color, #ffffff);
  opacity: .5;
}

/* ── Field Hint ── */
.woopw-rx-field-hint {
  font-size: .78rem;
  color: var(--theme-text-color, #ffffff);
  opacity: .5;
  line-height: 1.4;
}

/* ── Field Error ── */
.woopw-rx-field-error {
  font-size: .8rem;
  color: #ff6b6b;
  min-height: 1em;
  display: block;
  line-height: 1.4;
}

/* ── Same Address Toggle ── */
.woopw-rx-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  color: var(--theme-text-color, #ffffff);
  user-select: none;
}

.woopw-rx-toggle-check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.woopw-rx-toggle-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 2px solid var(--rx-border-input);
  border-radius: 4px;
  flex-shrink: 0;
  background: #fff;
  transition: background var(--rx-transition), border-color var(--rx-transition);
}

.woopw-rx-toggle-box svg {
  width: 11px;
  height: 11px;
  color: #fff;
  opacity: 0;
  transition: opacity var(--rx-transition);
}

.woopw-rx-toggle-check:checked ~ .woopw-rx-toggle-box {
  background-color: var(--theme-primary-color, #2c6fad);
  border-color: var(--theme-primary-color, #2c6fad);
}

.woopw-rx-toggle-check:checked ~ .woopw-rx-toggle-box svg {
  opacity: 1;
}

/* ── Postal Fields (shown when different address) ── */
.woopw-rx-postal-fields {
  border-top: 1px solid var(--rx-border);
  margin-top: 0.5rem;
}

.woopw-rx-postal-fields .woopw-rx-grid {
  margin-top: 0;
}

/* ── Dropzone ── */
.woopw-rx-dropzone {
  position: relative;
  border: 2px dashed var(--rx-border-input);
  border-radius: var(--rx-radius);
  background:  #ffffff;
  transition: border-color var(--rx-transition), background var(--rx-transition);
  cursor: pointer;
  overflow: hidden;
}

.woopw-rx-dropzone:hover,
.woopw-rx-dropzone.is-dragover {
  border-color: var(--theme-primary-color, #2c6fad);
  background: rgba(44, 111, 173, .08);
}

.woopw-rx-dropzone.is-dragover {
  border-style: solid;
}

.woopw-rx-dropzone.is-invalid {
  border-color: #ff6b6b;
}

.woopw-rx-dropzone__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.woopw-rx-dropzone__idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  text-align: center;
  gap: .4rem;
}

.woopw-rx-dropzone__icon {
  width: 44px;
  height: 44px;
  color: var(--theme-primary-color, #2c6fad);
  opacity: .9;
  margin-bottom: .25rem;
}

.woopw-rx-dropzone__main {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--theme-text-color, #ffffff);
}

.woopw-rx-dropzone__or {
  margin: 0;
  font-size: .85rem;
  color: var(--theme-text-color, #ffffff);
  opacity: .5;
}

.woopw-rx-dropzone__browse {
  display: inline-block;
  background-color: var(--theme-primary-color, #2c6fad);
  color: #fff;
  border: none;
  padding: .45rem 1.1rem;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--rx-transition);
  position: relative;
  z-index: 2;
}

.woopw-rx-dropzone__browse:hover {
  opacity: .85;
}

.woopw-rx-dropzone__hint {
  margin: .25rem 0 0;
  font-size: .78rem;
  color: var(--theme-text-color, #ffffff);
  opacity: .45;
}

/* ── Dropzone Preview ── */
.woopw-rx-dropzone__preview {
  padding: 1.25rem 1.5rem;
}

.woopw-rx-dropzone__preview-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 1rem;
  background: var(--bg-theme-gradient-color-2, rgba(255,255,255,.06));
  border: 1px solid var(--rx-border-input);
  border-radius: var(--rx-radius-sm);
}

.woopw-rx-dropzone__preview-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid var(--rx-border-input);
}

.woopw-rx-dropzone__pdf {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 81, 0, .15);
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(230, 81, 0, .3);
}

.woopw-rx-dropzone__pdf svg {
  width: 32px;
  height: 32px;
  color: #ff8a65;
}

.woopw-rx-dropzone__preview-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.woopw-rx-dropzone__preview-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--theme-text-color, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.woopw-rx-dropzone__preview-size {
  font-size: .8rem;
  color: var(--theme-text-color, #ffffff);
  opacity: .5;
}

.woopw-rx-dropzone__remove {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: none;
  border: 1px solid var(--rx-border-input);
  color: var(--theme-text-color, #ffffff);
  opacity: .7;
  padding: .3rem .65rem;
  border-radius: 4px;
  font-size: .8rem;
  cursor: pointer;
  transition: border-color var(--rx-transition), color var(--rx-transition), opacity var(--rx-transition);
  margin-top: .35rem;
  align-self: flex-start;
  position: relative;
  z-index: 2;
}

.woopw-rx-dropzone__remove:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
  opacity: 1;
}

.woopw-rx-dropzone__remove svg {
  width: 13px;
  height: 13px;
}

/* ── Submit Area ── */
.woopw-rx-submit-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: .5rem;
}

.woopw-rx-disclaimer {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--theme-text-color, #ffffff);
  opacity: .55;
  margin: 0;
  text-align: center;
}

.woopw-rx-disclaimer svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #4caf50;
  opacity: 1;
}

/* ── Submit Button ── */
.woopw-rx-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background-color: var(--theme-primary-color, #2c6fad);
  color: #fff;
  border: none;
  padding: .875rem 2.5rem;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--rx-transition), transform var(--rx-transition), box-shadow var(--rx-transition);
  min-width: 220px;
  letter-spacing: .02em;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

.woopw-rx-submit:hover:not(:disabled) {
  opacity: .88;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}

.woopw-rx-submit:active {
  transform: translateY(0);
}

.woopw-rx-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.woopw-rx-submit__text {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.woopw-rx-submit__text svg {
  width: 17px;
  height: 17px;
}

.woopw-rx-submit__loading {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

/* ── Spinner ── */
.woopw-rx-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: woopw-rx-spin .7s linear infinite;
  flex-shrink: 0;
}

@keyframes woopw-rx-spin {
  to { transform: rotate(360deg); }
}

/* ── Success Card ── */
.woopw-rx-success {
  text-align: center;
  padding: 3.5rem 2rem;
  background: var(--bg-theme-gradient-color-2);
  border-radius: var(--rx-radius);
  box-shadow: var(--rx-shadow);
}

.woopw-rx-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(76, 175, 80, .12);
  border: 2px solid rgba(76, 175, 80, .4);
  margin-bottom: 1.25rem;
  animation: woopw-rx-pop .4s cubic-bezier(.175,.885,.32,1.275) forwards;
}

@keyframes woopw-rx-pop {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.woopw-rx-success__icon svg {
  width: 36px;
  height: 36px;
  color: #4caf50;
}

.woopw-rx-success__title {
  margin: 0 0 .6rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--theme-text-color, #ffffff);
}

.woopw-rx-success__message {
  margin: 0 auto .75rem;
  max-width: 480px;
  color: var(--theme-text-color, #ffffff);
  opacity: .7;
  font-size: .95rem;
  line-height: 1.6;
}

.woopw-rx-success__order {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--rx-border-input);
  padding: .5rem 1.25rem;
  border-radius: 30px;
  font-size: .9rem;
  color: var(--theme-text-color, #ffffff);
  margin-bottom: .875rem;
}

.woopw-rx-success__order strong {
  color: var(--theme-primary-color, #2c6fad);
  font-size: 1rem;
}

.woopw-rx-success__note {
  margin: 0 0 1.5rem;
  font-size: .85rem;
  color: var(--theme-text-color, #ffffff);
  opacity: .55;
}

.woopw-rx-success__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background-color: var(--theme-primary-color, #2c6fad);
  color: #fff;
  padding: .7rem 1.75rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  transition: opacity var(--rx-transition);
}

.woopw-rx-success__link:hover {
  opacity: .85;
  color: #fff;
  text-decoration: none;
}

/* ── Add-on List ── */
.woopw-rx-addon-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.woopw-rx-addon-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 1.5px solid var(--rx-border-input);
  border-radius: var(--rx-radius-sm);
  cursor: pointer;
  transition: border-color var(--rx-transition), background var(--rx-transition);
  user-select: none;
}

.woopw-rx-addon-item:hover {
  border-color: var(--theme-primary-color, #2c6fad);
  background: rgba(44, 111, 173, .06);
}

.woopw-rx-addon-item .woopw-rx-toggle-box {
  margin-top: 2px;
}

.woopw-rx-addon-item:has(.woopw-rx-toggle-check:checked) {
  border-color: var(--theme-primary-color, #2c6fad);
  background: rgba(44, 111, 173, .08);
}

.woopw-rx-addon-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .5rem;
  flex: 1;
}

.woopw-rx-addon-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--theme-text-color, #ffffff);
}

.woopw-rx-addon-price {
  font-size: .82rem;
  font-weight: 700;
  color: var(--theme-primary-color, #2c6fad);
  background: rgba(44, 111, 173, .12);
  padding: .1rem .45rem;
  border-radius: 20px;
}

.woopw-rx-addon-desc {
  width: 100%;
  font-size: .78rem;
  color: var(--theme-text-color, #ffffff);
  opacity: .5;
  line-height: 1.4;
}

/* ── Consent ── */
.woopw-rx-consent {
  padding: 1.25rem 0 .5rem;
}

.woopw-rx-toggle-label--block {
  display: flex;
  align-items: flex-start;
  font-size: .875rem;
  line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 620px) {
  .woopw-rx-card__header {
    padding: 1.25rem;
  }

  .woopw-rx-card__title {
    font-size: 1.15rem;
  }

  .woopw-rx-banner {
    margin: 1rem 1.25rem 0;
  }

  #woopw-patient-prescription-form {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .woopw-rx-grid--2 {
    grid-template-columns: 1fr;
  }

  .woopw-rx-dropzone__idle {
    padding: 1.75rem 1rem;
  }

  .woopw-rx-submit {
    width: 100%;
  }

  .woopw-rx-success {
    padding: 2.5rem 1.25rem;
  }
}

/* ── Rx Prescription Uploaded Notice (My Account order view) ──────── */
.woopw-rx-patient-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  background: #f0faf4;
  border: 1px solid #a8d5b8;
  border-left: 4px solid #1a7a4a;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.woopw-rx-patient-notice-icon {
  flex-shrink: 0;
  color: #1a7a4a;
  margin-top: 1px;
}

.woopw-rx-patient-notice-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.woopw-rx-patient-notice-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: #14532d;
}

.woopw-rx-patient-notice-text {
  font-size: 0.875rem;
  color: #276843;
  line-height: 1.4;
}

/* ── Pay Now button (My Account orders list) ──────────────────────── */
.woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions a.button.pay {
  background-color: #c0392b !important;
  border-color: #c0392b !important;
  color: #fff !important;
}

.woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions a.button.pay:hover {
  background-color: #a93226 !important;
  border-color: #a93226 !important;
  color: #fff !important;
}

/* ── Login Notice (shown to guests) ── */
.woopw-rx-login-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  gap: 1rem;
}

.woopw-rx-login-notice__icon svg {
  width: 56px;
  height: 56px;
  stroke: var(--rx-primary);
  opacity: .85;
}

.woopw-rx-login-notice__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: inherit;
}

.woopw-rx-login-notice__text {
  margin: 0;
  opacity: .75;
  font-size: .95rem;
}

.woopw-rx-login-notice__btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
  text-decoration: none;
}
.woopw-rx-login-notice__btn:hover{
  color: var(--theme-primary-color);
    background-color: var(--theme-secondary-color);
}
.woopw-rx-login-notice__btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

a.woocommerce-button.button.pay {
    border: 1px solid var(--theme-primary-color) !important;
    background: transparent !important; ;
    padding: 8px 16px;
    color: var(--theme-primary-color) !important;
    font-weight: 700;;
}

/* ── Prescription upload notice link ── */
.woopw-rx-notice-link {
  display: inline-block;
  vertical-align: middle;
  padding: 4px 12px;
  background-color: var(--theme-primary-color, #2c6fad);
  color: #fff !important;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.woopw-rx-notice-link:hover {
  opacity: 0.85;
  color: #fff !important;
}

/* ── Order pay page ── */
.woocommerce-order-pay td.product-subtotal,
.woocommerce-order-pay td.product-price {
  width: auto !important;
  display: table-cell !important;
  text-align: left !important;
  flex: none !important;
}
h3.woopw-rx-section__title.rx-file-upload-field {
    gap: .2rem;
}

/* ==========================================================================
   WooPW — Prescription Upload Thank-You Page
   ========================================================================== */

/* ── Layout overrides: hide theme banner, full-width hero ── */
body.woopw-rx-thankyou-page {
  overflow-x: hidden;
}
body.woopw-rx-thankyou-page .woo-page-banner-section {
  display: none !important;
}
body.woopw-rx-thankyou-page .page-content-section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
body.woopw-rx-thankyou-page .page-content-section > .container,
body.woopw-rx-thankyou-page .page-content-section .row,
body.woopw-rx-thankyou-page .page-content-section [class*="col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  flex: none !important;
}
body.woopw-rx-thankyou-page .page-content {
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Root variables ── */
.woopw-rx-thankyou {
  /* Wired to theme customizer — fall back to sensible defaults if vars are absent */
  --ty-navy:        var(--theme-dark-background,       #1f3a4d);
  --ty-navy-deep:   var(--theme-dark-background2,      #16293a);
  --ty-teal:        var(--theme-secondary-color,       #2dd4bf);
  --ty-teal-deep:   var(--theme-secondary-dark-color,  #14b8a6);
  --ty-btn-bg:      var(--theme-btn-primary-color,     #1f3a4d);
  --ty-btn-txt:     var(--theme-primary-btn-txt-color, #ffffff);
  --ty-ink:         var(--theme-text-color,            #0f1f2c);
  --ty-card-radius: var(--card-radius,                 16px);
  --ty-btn-radius:  var(--btn-radius,                  10px);

  /* Neutral tones — not branding, kept fixed */
  --ty-mint:       #d1faf3;
  --ty-cream:      #f7f5f0;
  --ty-muted:      #5a6b78;
  --ty-line:       #e6ebef;
  --ty-white:      #ffffff;

  /* Semantic amber — fixed, unrelated to site branding */
  --ty-amber:      #f5a524;
  --ty-amber-soft: #fff4dd;

  font-family: inherit;
  color: var(--ty-ink);
  line-height: 1.55;
}

/* ── Hero ── */
.woopw-rx-ty-hero {
  background: linear-gradient(180deg, var(--ty-navy-deep) 0%, var(--ty-navy) 100%);
  color: white;
  padding: 56px 24px 110px;
  position: relative;
  overflow: hidden;
}
.woopw-rx-ty-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(45,212,191,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.woopw-rx-ty-hero::after {
  content: '';
  position: absolute;
  bottom: -180px; left: -100px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(45,212,191,0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.woopw-rx-ty-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

/* ── Status pill ── */
.woopw-rx-ty-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(45,212,191,0.15);
  border: 1px solid rgba(45,212,191,0.35);
  color: var(--ty-teal);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.woopw-rx-ty-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ty-teal);
  display: inline-block;
  animation: woopw-ty-pulse 2s infinite;
}
@keyframes woopw-ty-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(45,212,191,0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(45,212,191,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); }
}

/* ── Hero text ── */
.woopw-rx-ty-headline {
  font-size: clamp(28px, 5vw, 46px) !important;
  font-weight: 500 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 16px !important;
  max-width: 720px;
  color: white !important;
}
.woopw-rx-ty-headline em {
  font-style: italic;
  color: var(--ty-teal);
}
.woopw-rx-ty-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.78);
  max-width: 640px;
  line-height: 1.6;
  margin: 0;
}

/* ── Order meta strip ── */
.woopw-rx-ty-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.woopw-rx-ty-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 4px;
}
.woopw-rx-ty-meta-value {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

/* ── Content wrap ── */
.woopw-rx-ty-content {
  max-width: 920px;
  margin: -68px auto 0;
  padding: 0 24px 64px;
  position: relative;
  z-index: 2;
}

/* ── Alert card ── */
.woopw-rx-ty-alert-card {
  background: var(--ty-white);
  border-radius: var(--ty-card-radius);
  padding: 28px 32px;
  box-shadow: 0 20px 50px -20px rgba(15,31,44,0.25);
  border: 1px solid var(--ty-line);
  border-left: 4px solid var(--ty-amber);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.woopw-rx-ty-alert-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--ty-amber-soft);
  color: var(--ty-amber);
  display: flex;
  align-items: center;
  justify-content: center;
}
.woopw-rx-ty-alert-card h2 {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: var(--ty-navy) !important;
  margin: 0 0 6px !important;
  letter-spacing: -0.01em;
}
.woopw-rx-ty-alert-card p {
  color: var(--ty-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.woopw-rx-ty-alert-card p strong {
  color: var(--ty-navy);
  font-weight: 600;
}

/* ── Section card ── */
.woopw-rx-ty-section {
  background: var(--ty-white);
  border-radius: var(--ty-card-radius);
  padding: 36px 32px;
  margin-top: 24px;
  border: 1px solid var(--ty-line);
}
.woopw-rx-ty-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ty-teal-deep);
  font-weight: 600;
  margin-bottom: 8px;
}
.woopw-rx-ty-section-title {
  font-size: 26px !important;
  font-weight: 500 !important;
  color: var(--ty-navy) !important;
  letter-spacing: -0.015em !important;
  margin-bottom: 28px !important;
}

/* ── Steps ── */
.woopw-rx-ty-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.woopw-rx-ty-step {
  padding: 24px 22px;
  background: var(--ty-cream);
  border-radius: 14px;
  border: 1px solid var(--ty-line);
}
.woopw-rx-ty-step--active {
  background: linear-gradient(135deg, var(--ty-navy-deep) 0%, var(--ty-navy) 100%);
  border-color: transparent;
}
.woopw-rx-ty-step-num {
  display: block;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 14px;
  color: var(--ty-teal-deep);
}
.woopw-rx-ty-step--active .woopw-rx-ty-step-num {
  color: var(--ty-teal);
}
.woopw-rx-ty-step h3 {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--ty-navy) !important;
  margin: 0 0 8px !important;
}
.woopw-rx-ty-step--active h3 {
  color: white !important;
}
.woopw-rx-ty-step p {
  font-size: 13px;
  color: var(--ty-muted);
  line-height: 1.55;
  margin: 0;
}
.woopw-rx-ty-step--active p {
  color: rgba(255,255,255,0.78);
}

/* ── Postal address block ── */
.woopw-rx-ty-postal-block {
  background: var(--ty-mint);
  border: 1.5px dashed var(--ty-teal-deep);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.woopw-rx-ty-postal-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ty-teal-deep);
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.woopw-rx-ty-postal-block address {
  font-style: normal;
  font-size: 16px;
  color: var(--ty-navy);
  line-height: 1.55;
  font-weight: 500;
}
.woopw-rx-ty-copy-btn {
  background: var(--ty-btn-bg);
  color: var(--ty-btn-txt);
  border: 0;
  padding: 12px 22px;
  border-radius: var(--ty-btn-radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.woopw-rx-ty-copy-btn:hover {
  opacity: 0.85;
}

/* ── Notes grid ── */
.woopw-rx-ty-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.woopw-rx-ty-note {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: var(--ty-cream);
  border-radius: 12px;
  border: 1px solid var(--ty-line);
}
.woopw-rx-ty-note-check {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ty-mint);
  color: var(--ty-teal-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.woopw-rx-ty-note-text {
  font-size: 14px;
  color: var(--ty-navy);
  line-height: 1.5;
}
.woopw-rx-ty-note-text strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
}
.woopw-rx-ty-note-text span {
  color: var(--ty-muted);
}

/* ── Order table ── */
.woopw-rx-ty-order-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.woopw-rx-ty-order-table th,
.woopw-rx-ty-order-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--ty-line);
}
.woopw-rx-ty-order-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ty-muted);
  font-weight: 600;
  background: var(--ty-cream);
}
.woopw-rx-ty-order-table th:last-child,
.woopw-rx-ty-order-table td:last-child {
  text-align: right;
}
.woopw-rx-ty-order-table td {
  font-size: 14px;
  color: var(--ty-navy);
}
.woopw-rx-ty-qty {
  color: var(--ty-muted);
  font-size: 13px;
}
.woopw-rx-ty-row-subtotal td {
  font-weight: 700;
  color: var(--ty-navy);
  background: var(--ty-cream);
}
.woopw-rx-ty-row-payment td {
  color: var(--ty-muted);
  border-bottom: 0;
}

/* ── Billing block ── */
.woopw-rx-ty-billing-block {
  padding: 20px 22px;
  background: var(--ty-cream);
  border-radius: 12px;
  font-size: 14px;
  color: var(--ty-navy);
  line-height: 1.7;
}
.woopw-rx-ty-billing-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ty-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

/* ── Help card ── */
.woopw-rx-ty-help-card {
  background: linear-gradient(135deg, var(--ty-navy-deep) 0%, var(--ty-navy) 100%);
  color: white;
  border-radius: var(--ty-card-radius);
  padding: 32px;
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.woopw-rx-ty-help-card h3 {
  font-size: 22px !important;
  font-weight: 500 !important;
  color: white !important;
  margin: 0 0 6px !important;
  letter-spacing: -0.01em;
}
.woopw-rx-ty-help-card p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin: 0;
}
.woopw-rx-ty-help-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.woopw-rx-ty-help-btn {
  background: var(--ty-teal);
  color: var(--ty-navy-deep);
  border: 0;
  padding: 12px 22px;
  border-radius: var(--ty-btn-radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.woopw-rx-ty-help-btn:hover {
  opacity: 0.9;
  color: var(--ty-navy-deep);
}
.woopw-rx-ty-help-btn--secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.woopw-rx-ty-help-btn--secondary:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* ── Action bar ── */
.woopw-rx-ty-action-bar {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.woopw-rx-ty-btn-primary,
.woopw-rx-ty-btn-secondary {
  padding: 13px 28px;
  border-radius: var(--ty-btn-radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}
.woopw-rx-ty-btn-primary {
  background: var(--ty-btn-bg);
  color: var(--ty-btn-txt);
}
.woopw-rx-ty-btn-primary:hover {
  opacity: 0.85;
  color: var(--ty-btn-txt);
}
.woopw-rx-ty-btn-secondary {
  background: var(--ty-white);
  color: var(--ty-navy);
  border: 1px solid var(--ty-line);
}
.woopw-rx-ty-btn-secondary:hover {
  background: var(--ty-cream);
  color: var(--ty-navy);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .woopw-rx-ty-hero { padding: 40px 20px 90px; }
  .woopw-rx-ty-content { padding: 0 16px 48px; }
  .woopw-rx-ty-alert-card { flex-direction: column; padding: 24px 20px; }
  .woopw-rx-ty-section { padding: 28px 20px; }
  .woopw-rx-ty-steps { grid-template-columns: 1fr; }
  .woopw-rx-ty-notes-grid { grid-template-columns: 1fr; }
  .woopw-rx-ty-help-card { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .woopw-rx-ty-postal-block { flex-direction: column; align-items: flex-start; }
  .woopw-rx-ty-order-meta { gap: 20px; }
}
@media (max-width: 480px) {
  .woopw-rx-ty-headline { font-size: 26px !important; }
  .woopw-rx-ty-action-bar { flex-direction: column; align-items: stretch; }
  .woopw-rx-ty-btn-primary,
  .woopw-rx-ty-btn-secondary { justify-content: center; }
}

/* ==========================================================================
   Typeahead medicine search
   ========================================================================== */

.woopw-rx-typeahead {
  position: relative;
}

/* Wrap holds the input + icon as a unit.
   Hidden by JS when a product is selected so the icon doesn't orphan. */
.woopw-rx-typeahead__wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* Search icon — positioned inside left edge of the input */
.woopw-rx-typeahead__icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--theme-text-color, #1f3a4d);
  opacity: .45;
  pointer-events: none;
  flex-shrink: 0;
  z-index: 1;
}

.woopw-rx-typeahead__input {
  padding-left: 38px !important;
  padding-right: 38px !important;
}

/* Loading state — animated border on the input */
.woopw-rx-typeahead__input.is-loading {
  border-color: var(--theme-secondary-color, #2dd4bf) !important;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .2) !important;
}

/* Spinner ring — right side of the input */
.woopw-rx-typeahead__spinner {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(45, 212, 191, .25);
  border-top-color: var(--theme-secondary-color, #2dd4bf);
  border-radius: 50%;
  animation: woopw-rx-typeahead-spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes woopw-rx-typeahead-spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}

/* Skeleton loading rows shown in the dropdown while AJAX is in flight */
.woopw-rx-typeahead__skel-row {
  padding: 12px 16px;
  pointer-events: none;
  list-style: none;
}
.woopw-rx-typeahead__skel {
  display: block;
  height: 13px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,.06) 0%,
    rgba(0,0,0,.11) 40%,
    rgba(0,0,0,.06) 100%
  );
  background-size: 300% 100%;
  animation: woopw-rx-shimmer 1.4s ease-in-out infinite;
}
@keyframes woopw-rx-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Suggestions dropdown */
.woopw-rx-typeahead__suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-theme-gradient-color-2, #fff);
  border: 1.5px solid var(--rx-border-input, rgba(0,0,0,.12));
  border-radius: var(--rx-radius-sm);
  box-shadow: 0 8px 28px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.08);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 260px;
  overflow-y: auto;
  z-index: 200;
}

.woopw-rx-typeahead__item {
  padding: 11px 16px;
  font-size: .9rem;
  color: var(--theme-text-color, #1f3a4d);
  cursor: pointer;
  transition: background var(--rx-transition);
  border-radius: 0;
}
.woopw-rx-typeahead__item:hover,
.woopw-rx-typeahead__item.is-active {
  background: rgba(45, 212, 191, .12);
  color: var(--theme-secondary-dark-color, #14b8a6);
}

/* Selected state — replaces the input wrap when a product is chosen */
.woopw-rx-typeahead__selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(45, 212, 191, .10);
  border: 1.5px solid rgba(45, 212, 191, .5);
  border-radius: var(--rx-radius-sm);
  color: var(--theme-text-color, #1f3a4d);
}

.woopw-rx-typeahead__selected svg {
  flex-shrink: 0;
  color: var(--theme-secondary-color, #2dd4bf);
}

.woopw-rx-typeahead__selected-name {
  flex: 1;
  font-size: .9rem;
  font-weight: 600;
}

.woopw-rx-typeahead__clear {
  background: none;
  border: none;
  color: var(--theme-text-color, #1f3a4d);
  opacity: .45;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  transition: opacity var(--rx-transition);
  flex-shrink: 0;
}
.woopw-rx-typeahead__clear:hover {
  opacity: 1;
}

/* Not-found prompt */
.woopw-rx-medicine-notfound {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(245, 165, 36, .08);
  border: 1px solid rgba(245, 165, 36, .3);
  border-radius: var(--rx-radius-sm);
}

.woopw-rx-medicine-notfound__prompt {
  font-size: .85rem;
  color: var(--theme-text-color, #1f3a4d);
  opacity: .8;
  margin: 0;
}

.woopw-rx-medicine-notfound__toggle {
  background: none;
  border: none;
  padding: 0;
  color: var(--theme-secondary-dark-color, #14b8a6);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 4px;
  transition: opacity var(--rx-transition);
}
.woopw-rx-medicine-notfound__toggle:hover {
  opacity: .75;
}

.woopw-rx-medicine-notfound__area {
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(45, 212, 191, .05);
  border: 1px dashed rgba(45, 212, 191, .35);
  border-radius: var(--rx-radius-sm);
}

.woopw-rx-typeahead__note {
  resize: vertical;
  min-height: 80px;
}