/* Color Palette */
:root {
  --trs-dark-green: #113221;
  --trs-white: #ffffff;
  --trs-gold: #eaca67;
  --trs-black: #111111;
  --trs-grey-light: #f5f5f5;
  --trs-grey-border: #e0e0e0;
  --trs-grey-text: #111111;
}

/* Typography - Sans-serif font family */
* {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* Container */
.trs-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--trs-white);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(17, 50, 33, 0.08);
}

/* Progress Bar */
.trs-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
}

.trs-progress::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--trs-grey-border);
  z-index: 1;
}

.trs-step {
  position: relative;
  z-index: 2;
  background: var(--trs-white);
  padding: 0 1rem;
  text-align: center;
  color: var(--trs-black);
}

.trs-step.active {
  color: var(--trs-black);
}

.trs-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--trs-grey-border);
  margin: 0 auto 0.5rem;
  color: var(--trs-black);
  font-weight: bold;
}

.trs-step.active .trs-step-number {
  background: var(--trs-gold);
  color: var(--trs-black);
}

/* Form Styles */
.trs-form {
  margin-bottom: 2rem;
}

.trs-form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--trs-grey-border);
}

.trs-form-section:last-child {
  border-bottom: none;
}

.trs-form-group {
  margin-bottom: 1.5rem;
}

.trs-form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.trs-form-col {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--trs-black);
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--trs-grey-border);
  border-radius: 4px;
  font-size: 1rem;
  background: var(--trs-white);
  color: var(--trs-black);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: #666666;
  outline: none;
}

input[readonly] {
  background: #f0f0f0;
  color: var(--trs-grey-text);
  cursor: not-allowed;
  border: 1px solid var(--trs-grey-border);
}

input[readonly]:focus {
  border: 1px solid var(--trs-grey-border);
  box-shadow: none;
  outline: none;
}

/* Slider */
.trs-slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

input[type="range"] {
  flex: 1;
  height: 4px;
  background: var(--trs-grey-border);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--trs-gold);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Buttons */
.trs-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.trs-button-primary {
  background: var(--trs-black);
  color: var(--trs-white);
  border: none;
}

.trs-button-primary:hover {
  background: var(--trs-gold);
  color: var(--trs-black);
  border: none;
}

.trs-button-secondary {
  background: var(--trs-gold);
  color: var(--trs-black);
  border: none;
}

.trs-button-secondary:hover {
  background: var(--trs-black);
  color: var(--trs-white);
  border: none;
}

.trs-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Payment Section */
.trs-payment-summary {
  background: var(--trs-grey-light);
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 2rem;
  border: 1px solid var(--trs-grey-border);
}

.trs-summary-item {
  margin-bottom: 0.5rem;
  color: var(--trs-black);
}

.trs-payment-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Messages */
.trs-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 4px;
  background: var(--trs-grey-light);
  color: var(--trs-black);
  border: 1px solid #666666;
}

.trs-error {
  background: #fff4e5;
  color: #b85c00;
  border: 1px solid #666666;
}

/* Confirmation Section */
.trs-confirmation-content {
  text-align: center;
  padding: 2rem;
}

.trs-confirmation-icon {
  width: 60px;
  height: 60px;
  background: var(--trs-gold);
  color: var(--trs-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  border: 2px solid var(--trs-black);
}

/* Transitions */
.trs-fade {
  transition: opacity 0.4s ease;
}

.trs-visible {
  opacity: 1;
}

.trs-hidden {
  opacity: 0;
}

.trs-removed {
  display: none;
}

/* My Team Specific Styles */
.trs-member-item,
.trs-invitation-item {
  background: white;
  border: 1px solid var(--trs-grey-border);
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trs-member-info,
.trs-invitation-info {
  flex: 1;
}

.trs-member-name,
.trs-invitation-name {
  font-weight: 600;
  color: var(--trs-black);
  margin-bottom: 0.25rem;
}

.trs-member-email,
.trs-invitation-email {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.trs-member-date,
.trs-invitation-date {
  color: #888;
  font-size: 0.8rem;
}

.trs-captain-badge {
  background: var(--trs-gold);
  color: var(--trs-black);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.trs-invitation-actions {
  display: flex;
  gap: 0.5rem;
}

.trs-resend-btn {
  background: var(--trs-gold);
  color: var(--trs-black);
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.trs-resend-btn:hover {
  background: #d4b95a;
}

.trs-empty-state {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

/* Team Assignment Styles */
.trs-assignment-item {
  background: white;
  border: 1px solid var(--trs-grey-border);
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 0.5rem;
}

.trs-assignment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.trs-assignment-title {
  font-weight: 600;
  color: var(--trs-black);
}

.trs-assignment-role {
  background: var(--trs-gold);
  color: var(--trs-black);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 600;
}

.trs-assignment-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.trs-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s;
}
.trs-modal-overlay.trs-removed {
  display: none;
  opacity: 0;
}
.trs-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90vw;
  max-width: 900px;
  padding: 2.5rem 1.5rem 1.5rem 1.5rem;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

/* Add specific styles for login modal */
#trs-login-modal .trs-modal-content {
  width: 90vw;
  max-width: 400px;
  height: auto;
  max-height: none;
  padding: 2rem;
}

#trs-login-modal .trs-form {
  margin-bottom: 0;
}

#trs-login-modal .trs-form-group:last-child {
  margin-bottom: 0;
}

.trs-modal-close {
  position: fixed;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 0;
  font-size: 2.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  line-height: 1;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.trs-modal-close:hover {
  background: #333;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.trs-modal-content iframe {
  border: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  background: #f5f5f5;
}
.trs-doc-link {
  background: none;
  border: none;
  color: #0073aa;
  text-decoration: underline;
  cursor: pointer;
  font-size: 1em;
  padding: 0;
}
.trs-doc-link:hover {
  color: #005177;
  text-decoration: underline;
}

.trs-modal-external-btn {
  display: none;
  width: 100%;
  margin: 1rem 0;
  padding: 1rem;
  background: #111;
  color: #fff;
  border: none;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}
@media (max-width: 600px) {
  .trs-modal-content iframe {
    display: none !important;
  }
  .trs-modal-external-btn {
    display: block;
  }
  .trs-modal-content {
    width: auto;
    max-width: 90vw;
    height: auto;
    max-height: none;
    padding: 2rem 1rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .trs-modal-overlay {
    align-items: center;
    justify-content: center;
  }
}
