/* Revamped GY - minimal front-end styling for the domain search UI.
   Keeps typography and colours mostly controlled by the active theme. */

.rgygy-domain-search-form {
  margin: 0 0 16px 0;
}

.rgygy-label {
  display: block;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.rgygy-label-small {
  display: block;
  margin: 0 0 6px 0;
}

.rgygy-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.rgygy-control {
  flex: 1;
  min-width: 220px;
}

.rgygy-control--years {
  flex: 0 0 auto;
  min-width: 160px;
}

.rgygy-control--submit {
  flex: 0 0 auto;
}

.rgygy-domain-search-form input[type="text"],
.rgygy-domain-search-form select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Shared inputs used in My Domains modals */
.rgygy-input,
.rgygy-ns-panel select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 12px;
}

.rgygy-help {
  margin: 10px 0 0 0;
}

/* Checkout upsells (Domain privacy protection) */
.rgygy-checkout-upsells {
  margin: 14px 0 10px 0;
  padding: 14px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  background: rgba(0,0,0,.02);
}

/* Checkout Blocks: keep the same add-on row style, but make the label bold and clear. */
.rgygy-blocks-privacy-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rgygy-blocks-privacy-field label,
.rgygy-blocks-privacy-field .wc-block-components-checkbox__label {
  font-weight: 700;
  color: #101010;
  flex: 1;
}

.rgygy-blocks-privacy-field input[type="checkbox"] {
  transform: scale(1.05);
}


.rgygy-checkout-upsells__title {
  margin: 0 0 10px 0;
}

.rgygy-checkout-upsells__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rgygy-checkout-upsells__label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  flex: 1;
}

.rgygy-checkout-upsells__label input[type="checkbox"] {
  margin-top: 2px;
  transform: scale(1.05);
}

.rgygy-checkout-upsells__text {
  display: inline-block;
}

.rgygy-checkout-upsells__meta {
  display: inline-block;
  margin-left: 6px;
  opacity: 0.85;
  font-size: 0.92em;
  font-weight: 500;
}

.rgygy-tooltip {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid rgba(54,85,246,.35);
  background: #FFFFFF;
  color: #3655F6;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.rgygy-tooltip__content {
  position: absolute;
  right: 0;
  top: 30px;
  width: min(320px, 78vw);
  background: #FFFFFF;
  color: #202224;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
  display: none;
  text-align: left;
  z-index: 99999;
}

.rgygy-tooltip:hover .rgygy-tooltip__content,
.rgygy-tooltip:focus .rgygy-tooltip__content,
.rgygy-tooltip[data-open="1"] .rgygy-tooltip__content {
  display: block;
}

@media (max-width: 520px) {
  .rgygy-checkout-upsells__row {
    align-items: flex-start;
  }
}

.rgygy-muted {
  opacity: 0.85;
  font-size: 0.92em;
}

.rgygy-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
}

/* Shared table styles used in My Domains modals (DNSSEC etc). */
.rgygy-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.rgygy-table th {
  background: rgba(0,0,0,.03);
  text-align: left;
  padding: 12px;
  font-weight: 700;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.rgygy-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  vertical-align: top;
}

.rgygy-table tr.odd td {
  background: #fff;
}

.rgygy-table tr.even td {
  background: rgba(0,0,0,.01);
}

.rgygy-results-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.rgygy-results-table th,
.rgygy-results-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  vertical-align: top;
}

.rgygy-results-table thead th {
  font-weight: 600;
  background: rgba(0,0,0,.02);
}

.rgygy-results-table tbody tr:nth-child(even) {
  background: rgba(0,0,0,.015);
}

.rgygy-domain {
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.rgygy-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1.2;
}

.rgygy-badge--ok {
  background: rgba(34, 197, 94, 0.12);
}

.rgygy-badge--no {
  background: rgba(239, 68, 68, 0.12);
}

.rgygy-badge--progress {
  background: rgba(54, 85, 246, 0.12);
}

.rgygy-actions {
  white-space: nowrap;
}

.rgygy-action-btn {
  margin-top: 10px;
}

/* Make action buttons consistent and easy to tap/click (My Domains only) */
.rgygy-my-domains .rgygy-actions .rgygy-btn {
  width: 100%;
  text-align: center;
}

.rgygy-price {
  white-space: nowrap;
}

@media (max-width: 520px) {
  .rgygy-control {
    min-width: 100%;
  }
  .rgygy-control--years {
    min-width: 100%;
  }
}

/* My Domains (WooCommerce My Account) */
.rgygy-my-domains {
  margin: 10px 0;
}

.rgygy-my-domains-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
}

.rgygy-my-domains-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.rgygy-my-domains-table th,
.rgygy-my-domains-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  vertical-align: top;
}

.rgygy-my-domains-table thead th {
  font-weight: 600;
  background: rgba(0,0,0,.02);
}

.rgygy-my-domains-table tbody tr:nth-child(even) {
  background: rgba(0,0,0,.015);
}

.rgygy-ns-list {
  margin: 0;
  padding-left: 18px;
}

.rgygy-form {
  margin: 0 0 10px 0;
}

.rgygy-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.rgygy-btn {
  display: inline-block !important;
  padding: 12px 18px !important;
  border: 1px solid currentColor !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  background: transparent !important;
  cursor: pointer !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.rgygy-btn-primary {
  background: #3655F6 !important;
  border-color: #3655F6 !important;
  color: #FFFFFF !important;
}

.rgygy-btn-secondary {
  background: #FFFFFF;
}

.rgygy-domain-cards {
  display: none !important;
}

/* Layout switching is controlled by media queries only.
   Do not hard-force one layout, because some themes override account page layouts and can accidentally hide both layouts. */

.rgygy-domain-card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
  background: rgba(0,0,0,.01);
}

.rgygy-domain-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rgygy-domain-card__name {
  font-weight: 700;
}

.rgygy-domain-card__meta {
  min-width: 180px;
}

.rgygy-domain-card__section {
  margin-top: 12px;
}

.rgygy-domain-card__actions {
  margin-top: 12px;
}

.rgygy-domain-card__actions .rgygy-btn {
  width: 100%;
  text-align: center;
}

.rgygy-domain-card__actions .rgygy-action-btn {
  margin-top: 10px;
}

/* Mobile: switch table to cards, and hide nameserver update form */
@media (max-width: 780px) {
  .rgygy-my-domains-table-wrap {
    display: none !important;
  }
  .rgygy-domain-cards {
    display: block !important;
  }
  .rgygy-ns-update {
    display: none;
  }

  .rgygy-my-domains .rgygy-my-domains-table-wrap {
    display: none !important;
  }
  .rgygy-my-domains .rgygy-domain-cards {
    display: block !important;
  }
}

/* Modal (link-target based so it works reliably across browsers and themes) */
.rgygy-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
}

.rgygy-modal:target {
  display: block;
}

.rgygy-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: block;
  text-decoration: none;
}

.rgygy-modal__content {
  position: relative;
  max-width: 560px;
  width: calc(100% - 24px);
  margin: 60px auto;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.rgygy-modal__title {
  margin: 0 0 6px 0;
}

.rgygy-modal__close {
  position: absolute !important;
  top: 10px !important;
  right: 12px !important;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.1);
  background: #FFFFFF;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  pointer-events: auto;
  text-decoration: none;
  color: #202224;
}

@media (max-width: 520px) {
  .rgygy-modal__content {
    margin: 18px auto;
  }
}

/* Notices for My Domains */
.rgygy-notice{padding:12px 14px;border-radius:12px;margin:10px 0;border:1px solid rgba(0,0,0,0.08)}
.rgygy-notice-success{background:#F5F5FF;color:#202224;border-color:rgba(54,85,246,0.35)}
.rgygy-notice-error{background:#fff2f2;color:#202224;border-color:rgba(228,27,56,0.35)}
.rgygy-notice-neutral{background:#ffffff;color:#202224;border-color:rgba(0,0,0,0.12)}
.rgygy-notice{line-height:1.6;overflow-wrap:anywhere;word-break:normal}
.rgygy-notice a.rgygy-whois-inline-link{display:inline;white-space:nowrap}

/* Keep WHOIS checker link inline inside WooCommerce notices too */
.woocommerce-notices-wrapper a.rgygy-whois-inline-link,
.woocommerce-message a.rgygy-whois-inline-link{display:inline!important;white-space:nowrap!important}


/* Nameserver modal using <details> and <summary> */
.rgygy-ns-details{display:block;margin-top:10px}
.rgygy-ns-details > summary{list-style:none}
.rgygy-ns-details > summary::-webkit-details-marker{display:none}
.rgygy-ns-overlay{display:none}
.rgygy-ns-details[open] > .rgygy-ns-overlay{display:flex;position:fixed;inset:0;background:rgba(18,25,33,0.55);align-items:center;justify-content:center;z-index:99999;padding:16px}
.rgygy-ns-panel{background:#ffffff;border-radius:18px;max-width:640px;width:100%;padding:16px;border:1px solid rgba(0,0,0,0.08);box-shadow:0 10px 30px rgba(0,0,0,0.18)}
.rgygy-ns-title{margin:0 0 6px 0;font-size:18px;color:#101010}
.rgygy-ns-panel .rgygy-muted{overflow-wrap:anywhere;word-break:break-word}
.rgygy-ns-details[open] > summary{position:fixed;top:16px;right:16px;z-index:100000;width:44px;height:44px;padding:0!important;border-radius:12px;overflow:hidden;color:transparent!important}
.rgygy-ns-details[open] > summary::before{content:"×";display:block;color:#FFFFFF;font-size:30px;line-height:44px;text-align:center}
.rgygy-ns-panel .rgygy-textarea{width:100%;box-sizing:border-box}
