/*
 * Unified Event Teams - styles for the combined display + edit experience.
 * Uses CSS variables from style.css where available.
 */

/* ===== Action Buttons (top and bottom) ===== */
.uet-action-buttons {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.uet-btn-coach,
.uet-btn-special {
  min-width: 180px;
}

/* ===== Email Gate ===== */
.uet-email-gate {
  background: var(--cultured, #f5f6f8);
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 24px;
  margin: 20px 0;
  max-width: 500px;
}

.uet-email-gate-inner h4 {
  margin-top: 0;
  color: var(--charcoal, #3d4554);
}

.uet-email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.uet-email-form input[type="email"] {
  padding: 8px 12px;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}

.uet-email-message {
  margin: 12px 0;
  padding: 10px;
  border-radius: 4px;
  font-size: 0.95rem;
}

.uet-email-message.uet-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.uet-email-message.uet-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #86efac;
}

.uet-email-explanation {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 12px;
  line-height: 1.5;
}

.uet-hint {
  font-size: var(--fs-7, 1.5rem);
  color: #6b7280;
}

/* ===== Workflow Tabs ===== */
.uet-workflow-tabs {
  margin-bottom: 16px;
}

.uet-tabs-header {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #d1d5db;
}

.uet-tab {
  padding: 10px 20px;
  border: 1px solid #d1d5db;
  border-bottom: none;
  background: var(--cultured, #f5f6f8);
  cursor: pointer;
  font-size: var(--fs-6, 1.7rem);
  border-radius: 6px 6px 0 0;
  transition: background 0.2s;
}

.uet-tab:hover {
  background: #e5e7eb;
}

.uet-tab-active {
  background: white;
  font-weight: 600;
  color: var(--cinnamon-satin, #c7687f);
  border-bottom: 2px solid white;
  margin-bottom: -2px;
}

.uet-logged-in-as {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 8px;
}

/* ===== Not Authenticated / Loading ===== */
.uet-not-authenticated,
.uet-loading {
  padding: 24px;
  text-align: center;
  color: #6b7280;
  font-size: 1rem;
}

/* ===== Messages ===== */
.uet-message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.uet-message.uet-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.uet-message.uet-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #86efac;
}

/* ===== Interactive Team Table ===== */
.uet-team-table-container {
  margin: 16px 0;
}

.uet-instructions {
  margin: 0 0 12px 0;
  padding-left: 24px;
  font-size: 1.3rem;
  color: #374151;
}

.uet-instructions li {
  margin-bottom: 2px;
}

.uet-select-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.uet-selection-count {
  font-size: 0.9rem;
  color: #6b7280;
  margin-left: 8px;
}

.uet-btn-continue {
  margin-left: auto;
  background: var(--cinnamon-satin, #c7687f);
  color: #fff;
  border: none;
}

.uet-interactive-table {
  width: 100%;
}

.uet-checkbox-col {
  width: 36px;
  text-align: center;
}

.uet-interactive-table tbody tr {
  transition: background 0.15s;
}

.uet-interactive-table tbody tr:hover {
  background: #f3f4f6;
}

.uet-row-selected {
  background: #ede9fe !important;
}

.uet-row-selected:hover {
  background: #ddd6fe !important;
}

/* Clickable coach name link */
.uet-coach-link {
  cursor: pointer;
  color: var(--cinnamon-satin, #c7687f);
  text-decoration: underline;
  text-decoration-style: dotted;
}

.uet-coach-link:hover {
  color: var(--charcoal, #3d4554);
  text-decoration-style: solid;
}

/* Bottom action buttons */
.uet-action-buttons-bottom {
  margin-top: 16px;
}

/* ===== Coach Schedule Modal ===== */
.uet-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.uet-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.uet-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.uet-modal-header h4 {
  margin: 0;
  color: var(--charcoal, #3d4554);
}

.uet-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 8px;
  line-height: 1;
}

.uet-modal-close:hover {
  color: #1f2937;
}

.uet-modal-body {
  padding: 20px;
}

.uet-schedule-table {
  width: 100%;
  margin-top: 8px;
}

/* ===== Selected Teams Display ===== */
.uet-selected-teams {
  background: var(--cultured, #f5f6f8);
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
}

.uet-selected-teams h4 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--charcoal, #3d4554);
}

.uet-selected-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.uet-selected-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
}

.uet-selected-list li:last-child {
  border-bottom: none;
}

.uet-remove-btn {
  background: none;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 3px;
}

.uet-remove-btn:hover {
  background: #fef2f2;
}

/* ===== Workflow Panel ===== */
.uet-workflow-panel {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 20px;
  margin: 16px 0;
}

.uet-workflow-panel h4 {
  margin-top: 0;
  color: var(--charcoal, #3d4554);
}

.uet-coach-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.uet-coach-input-row label {
  font-weight: 600;
  white-space: nowrap;
}

.uet-coach-input-row input {
  max-width: 300px;
}

/* ===== Confirmation ===== */
.uet-confirmation {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
}

.uet-confirmation p {
  margin: 8px 0;
}

.uet-existing-teams,
.uet-new-teams {
  margin: 8px 0;
}

.uet-existing-teams ul,
.uet-new-teams ul {
  margin: 4px 0;
  padding-left: 20px;
}

.uet-confirmation-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.uet-btn-secondary {
  background: #e5e7eb !important;
  color: var(--charcoal, #3d4554) !important;
  border-color: #d1d5db !important;
}

.uet-btn-secondary:hover {
  background: #d1d5db !important;
}

/* ===== Checkbox Label ===== */
.uet-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--cultured, #f5f6f8);
  border-radius: 4px;
  margin: 12px 0;
  cursor: pointer;
}

.uet-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* ===== Request Input ===== */
.uet-request-input {
  margin: 12px 0;
}

.uet-request-input label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.uet-request-input textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: var(--fs-7, 1.5rem);
  border: 1px solid #d1d5db;
  border-radius: 4px;
  resize: vertical;
}

.uet-char-count {
  font-size: 0.8rem;
  color: #9ca3af;
  float: right;
}

/* ===== Zip Code Update ===== */
.uet-zip-update {
  border-top: 1px solid #e5e7eb;
  margin-top: 20px;
  padding-top: 16px;
}

.uet-zip-update h5 {
  margin-top: 0;
  color: var(--charcoal, #3d4554);
}

.uet-zip-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.uet-zip-input-row label {
  font-weight: 600;
  white-space: nowrap;
}

.uet-zip-input-row input {
  max-width: 120px;
}

/* ===== Coach Action Buttons ===== */
.uet-coach-action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Remove confirmation styling */
.uet-confirmation-remove {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .uet-action-buttons {
    flex-direction: column;
  }

  .uet-tabs-header {
    flex-direction: column;
  }

  .uet-tab {
    border-radius: 0;
    border-bottom: 1px solid #d1d5db;
  }

  .uet-coach-input-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .uet-zip-input-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
