/* Shared membership / auth form styles (matches index.html signup form) */

body.flagship-member-logged-in .flagship-guest-only,
body.flagship-member-logged-in #flagshipBecomeMemberNav {
  display: none !important;
}

/* Spacecrafted / form rules set display on some nodes; keep [hidden] authoritative */
[hidden] {
  display: none !important;
}

.flagship-signin-below-logo {
  margin: 0;
  padding: 0 0 1rem 0;
  text-align: left;
}

.primaryContent > .flagship-signin-below-logo {
  margin: 0;
  padding: 0 0 1rem 0;
  text-align: left;
}

.flagship-signin-below-logo .button {
  background: #0118ff;
  margin: 0;
  border-radius: 0;
  padding: 0.5em 2.5em;
  min-width: 225px;
  text-align: center;
  font-size: 19px !important;
  font-family: franklingothiccompresseddemi, sans-serif;
  color: #fff !important;
  text-transform: uppercase;
  display: inline-block;
  text-decoration: none;
  box-sizing: border-box;
  line-height: normal;
  vertical-align: top;
}

.flagship-signin-below-logo .button:hover {
  color: #fff !important;
}

.form-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 30px 40px;
  border-radius: 6px;
}

.form-container #step2 h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

#email.email-good {
  border-color: #0066cc;
  border-width: 2px;
}

#email.email-exists {
  border-color: #c00;
  border-width: 2px;
}

#email.email-resume {
  border-color: #d97706;
  border-width: 2px;
}

.formContainber img.logoform {
  margin: 0 auto 40px;
  display: table;
}

.form-group {
  margin-bottom: 20px;
}

.form-container label {
  display: block;
  font-weight: bold;
  color: #333;
  margin-bottom: 6px;
  font-size: 14px;
}

.form-container .required {
  color: red;
}

.form-container input,
.form-container textarea,
.form-container select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-size: 14px;
  background: #fff;
  margin-bottom: 9px;
  box-sizing: border-box;
  height: 40px;
}

.form-container textarea {
  height: auto;
  min-height: 80px;
  resize: none;
}

.form-container input.input-error,
.form-container select.input-error {
  border-color: #c00;
  border-width: 2px;
}

.two-inputs {
  display: flex;
  gap: 10px;
}

.two-inputs > div {
  flex: 1;
  min-width: 0;
}

.two-inputs input,
.two-inputs textarea,
.two-inputs select {
  flex: 1;
  height: 40px;
  width: 100%;
  max-width: 100%;
}

.btn-area {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
}

.btn-area.btn-area--end {
  justify-content: flex-end;
}

.btn-area button {
  background: #333;
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
}

.btn-area button:hover {
  background: #000;
}

.btn-area button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

/* Auth views (sign-in, forgot password, etc.) */
.flagship-auth-view {
  display: none;
}

.flagship-auth-view.is-active {
  display: block;
}

.auth-view-title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: #333;
}

.auth-help {
  font-size: 14px;
  color: #555;
  margin: 0 0 1rem;
  line-height: 1.45;
}

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 20px;
  font-size: 14px;
  color: #333;
}

.auth-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  margin: 0;
}

.auth-row input[type="checkbox"] {
  width: auto;
  height: auto;
  margin: 0;
}

.auth-text-link {
  background: none;
  border: none;
  padding: 0;
  color: #0118ff;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}

.auth-text-link:hover {
  color: #000;
}

.auth-text-link:disabled {
  color: #999;
  cursor: not-allowed;
  text-decoration: none;
}

.auth-back-row {
  text-align: center;
  margin-top: 1rem;
  font-size: 14px;
}

.auth-footer-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 14px;
  color: #555;
}

.auth-footer-link a {
  color: #0118ff;
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-link a:hover {
  text-decoration: underline;
}

.auth-message {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.auth-message--error {
  background: #fff3f0;
  border: 1px solid #e85d4c;
  color: #1a1a1a;
}

.auth-message--success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.field-error {
  display: none;
  font-size: 13px;
  color: #c00;
  margin-top: -4px;
  margin-bottom: 8px;
}

.field-error.is-visible {
  display: block;
}

.membership {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: #fff;
}

.membership p {
  font-size: 14px;
  margin: 5px 0 10px;
  color: #555;
}

.membership label {
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  margin-bottom: 5px;
}

.membership label input[type="radio"] {
  width: fit-content !important;
  margin: 0 !important;
  height: 30px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid #ddd;
  margin: 20px 0;
  padding-top: 10px;
}

.email-check-message {
  display: block;
  font-size: 13px;
  margin-top: 4px;
  min-height: 18px;
}

.email-check-message.email-good {
  color: #0066cc;
}

.email-check-message.email-exists {
  color: #c00;
}

.email-check-message.email-resume {
  color: #92400e;
}

.form-storage-blocked {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: #fff3f0;
  border: 1px solid #e85d4c;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #1a1a1a;
}

.boat-info-help {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #ddd;
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section h3 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: #333;
}

.btn-area .btn-secondary {
  background: #fff;
  color: #333;
  border: 2px solid #333;
}

.btn-area .btn-secondary:hover {
  background: #f5f5f5;
}

.btn-area .btn-secondary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

#packagesLoading {
  font-size: 14px;
  color: #666;
  margin-bottom: 0.75rem;
}

.flagship-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.45);
}

.flagship-modal-overlay.is-open {
  display: flex;
}

.flagship-modal {
  background: #fff;
  border-radius: 6px;
  max-width: 420px;
  width: 100%;
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.flagship-modal-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 1.5rem;
  line-height: 48px;
  font-weight: 700;
}

.flagship-modal-text {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.form-group.address input[type="hidden"] {
  display: none;
}

/* Google Places dropdown above fixed site header */
.pac-container {
  z-index: 100002 !important;
}

.address-search-hint {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* User profile (member portal — same shell as auth pages) */
.form-container.profile-container {
  max-width: 960px;
}

.profile-page {
  text-align: left;
}

.profile-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.profile-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e5e5;
  border-top-color: #0118ff;
  border-radius: 50%;
  animation: profile-spin 0.8s linear infinite;
}

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

.profile-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #ddd;
}

.profile-header-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
}

.profile-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  background: #e8eaf6;
}

.profile-avatar--c0 { background: #fee2e2; color: #991b1b; }
.profile-avatar--c1 { background: #fef3c7; color: #92400e; }
.profile-avatar--c2 { background: #dcfce7; color: #166534; }
.profile-avatar--c3 { background: #dbeafe; color: #1e40af; }
.profile-avatar--c4 { background: #f3e8ff; color: #6b21a8; }
.profile-avatar--c5 { background: #fce7f3; color: #9d174d; }
.profile-avatar--c6 { background: #ffedd5; color: #9a3412; }
.profile-avatar--c7 { background: #ecfccb; color: #3f6212; }

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.profile-action-wrap {
  position: relative;
  display: inline-block;
}

.profile-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.profile-status {
  font-size: 14px;
  color: #555;
  white-space: nowrap;
}

.profile-status-value {
  font-weight: 700;
}

.profile-status-value.is-active {
  color: #16a34a;
}

.profile-status-value.is-inactive {
  color: #dc2626;
}

.profile-pills {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid #ccc;
  border-radius: 999px;
  font-size: 14px;
  color: #1a1a1a;
  background: #fff;
}

.profile-pill-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #0118ff;
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0;
}

.profile-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.65rem 1rem;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  font-family: inherit;
}

.profile-tab:hover {
  color: #0118ff;
}

.profile-tab.is-active {
  color: #0118ff;
  border-bottom-color: #0118ff;
}

.profile-section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 1.5rem;
}

.profile-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.profile-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  border: 1px solid #1a1a1a;
  font-size: 14px;
}

.profile-table th,
.profile-table td {
  border: 1px solid #1a1a1a;
  padding: 0.85rem 0.75rem;
  text-align: left;
  vertical-align: middle;
}

.profile-table th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  background: #f5f5f5;
}

.profile-table tbody tr:hover {
  background: #fafafa;
}

.profile-table-empty,
.profile-table-loading {
  text-align: center;
  color: #666;
  padding: 2rem 1rem !important;
}

.profile-btn {
  display: inline-block;
  background: #333;
  color: #fff !important;
  border: none;
  padding: 10px 22px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
  text-decoration: none;
  line-height: normal;
  box-sizing: border-box;
}

.profile-btn:hover {
  background: #000;
  color: #fff !important;
}

.profile-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.profile-btn--outline {
  background: #fff;
  color: #333 !important;
  border: 2px solid #333;
}

.profile-btn--outline:hover {
  background: #f5f5f5;
  color: #000 !important;
}

.profile-btn--danger {
  background: #fff;
  color: #dc2626 !important;
  border: 2px solid #dc2626;
  padding: 6px 14px;
  font-size: 13px;
}

.profile-btn--danger:hover {
  background: #fef2f2;
  color: #b91c1c !important;
}

.profile-badge-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.profile-badge-pill.is-success {
  background: #dcfce7;
  color: #166534;
}

.profile-badge-pill.is-danger {
  background: #fee2e2;
  color: #991b1b;
}

.profile-top-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

@media only screen and (max-width: 767px) {
  .primaryContent > .flagship-signin-below-logo {
    text-align: center;
    padding: 0 0 1rem 0;
  }

  .flagship-signin-below-logo .button {
    width: 100%;
    max-width: 100%;
  }

  .form-container {
    padding: 20px 16px;
  }

  .profile-header {
    flex-direction: column;
  }

  .profile-header-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-actions {
    width: 100%;
  }

  .profile-actions .profile-btn {
    width: 100%;
    text-align: center;
  }

  .profile-tab {
    flex: 1 1 auto;
    text-align: center;
    min-width: calc(50% - 0.5rem);
  }
}
