/* Reusable UI components & utilities.
   Separate from site.css (layout/tokens), header.css and sidebar.css.
*/

/* Accessible visually-hidden text */
.sr-only{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.btn--primary{
  background: #7AAACE;
  border-color: #7AAACE;
  color: #fff;
}
.btn--primary:hover{ text-decoration: none; background: #7AAACE; border-color: #7AAACE; }

.btn--match{
  background: #7AAACE;
  border-color: #7AAACE;
  color: #fff;
  margin-left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn--match:hover{ 
  text-decoration: none; 
  background: #7AAACE;
  border-color: #7AAACE;
}
.btn--match .btn__icon{
  width: 18px;
  height: 18px;
}
.btn--match .btn__text{
  font-weight: 600;
}

@media (max-width: 768px) {
  .btn--match .btn__text {
    display: none;
  }
  .btn--match {
    margin-left: 8px;
    padding: 8px 12px;
  }
}

.btn--ghost{
  background: transparent;
}
.btn--ghost:hover{
  background: var(--page-bg);
  text-decoration: none;
}

/* Platform-wide primary button color */
.btn--primary,
.btn-primary,
.btn--match,
.btn-primary-green,
.clarification-btn-primary,
.btn-edit,
.job-action-btn,
.chat-input .btn--primary {
  background: #7AAACE !important;
  border-color: #7AAACE !important;
  color: #fff !important;
}

.btn--primary:hover,
.btn-primary:hover,
.btn--match:hover,
.btn-primary-green:hover,
.clarification-btn-primary:hover,
.btn-edit:hover,
.job-action-btn:hover,
.chat-input .btn--primary:hover {
  background: #7AAACE !important;
  border-color: #7AAACE !important;
  color: #fff !important;
}

.btn--sm{
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
}

/* Links (used in rightbar cards, etc.) */
.link{ color: var(--link); text-decoration: none; }
.link:hover{ text-decoration: none; }
.link--muted{ color: var(--muted); }

/* Cards (right column widgets, etc.) */
.card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 14px;
}

.card--tint{ background: #fdf7f2; }

.card__title{
  margin: 0 0 10px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.card__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

/* Lists */
.list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 13px;
}

/* Utility spacing */
.mt{ margin-top: 14px; }

/* Auth pages */
.auth-container{
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 20px;
}

.auth-card{
  background: #fff;
  border: 0px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 400px;
  width: 100%;
}

.auth-title{
  margin: 0 0 24px 0;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

.auth-form{
  display: grid;
  gap: 16px;
}

.form-group{
  display: grid;
  gap: 6px;
  position: relative;
}

.form-label{
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  position: absolute;
  top: 14px;
  left: 12px;
  pointer-events: none;
  transition: all 0.2s ease;
  background: white;
  padding: 0 4px;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form select{
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

/* Floating label - when input has value or focus */
.auth-form input:focus ~ .form-label,
.auth-form input:not(:placeholder-shown) ~ .form-label,
.auth-form select:focus ~ .form-label,
.auth-form select:not(:placeholder-shown) ~ .form-label{
  top: -8px;
  font-size: 12px;
  color: var(--blue);
}

.auth-form input::placeholder{
  color: transparent;
}

.auth-form select ~ .form-label{
  top: -8px;
  font-size: 12px;
  color: var(--text);
}

.auth-form input:focus,
.auth-form select:focus{
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-weak);
}

.form-error{
  color: #d93025;
  font-size: 13px;
}

.auth-submit{
  margin-top: 8px;
  width: 100%;
  padding: 12px;
  font-size: 16px;
}

.auth-footer{
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

/* Collective rows */
.collective{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.collective:first-of-type{ border-top: 0; }

.collective__badge{
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--page-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.collective__badge--avatar{
  border-radius: 50%;
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.collective__body{ flex: 1; min-width: 0; }

.collective__name{ font-weight: 700; font-size: 13px; }
.collective__meta{ color: var(--muted); font-size: 12px; }

/* Meeting message card styling */
.meeting-message-card {
  background: linear-gradient(135deg, #fff5f7 0%, #fff0f3 100%) !important;
  border: 1px solid #fce4e6 !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  margin: 8px 0 !important;
  font-size: 13px !important;
  color: #1f2937 !important;
  white-space: normal !important;
  line-height: 1.5 !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  display: block !important;
  word-break: break-word !important;
}

/* Ensure msg-wrapper doesn't interfere with meeting card */
.msg-wrapper:has(.meeting-message-card) {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  gap: 4px;
}


.meeting-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  color: #dc2626;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meeting-card-header svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #dc2626;
}

.meeting-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.meeting-card-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
  align-items: flex-start;
}

.meeting-card-label {
  font-weight: 600;
  color: #6b7280;
  min-width: 75px;
  flex-shrink: 0;
  padding-top: 2px;
}

.meeting-card-value {
  color: #1f2937;
  word-break: break-word;
  flex: 1;
  line-height: 1.4;
}

.meeting-card-description-label {
  font-weight: 600;
  color: #6b7280;
  margin-top: 4px;
  font-size: 13px;
}

.meeting-card-description-text {
  padding-left: 0;
  color: #374151;
  line-height: 1.5;
  font-style: italic;
  margin-top: -8px;
  padding-bottom: 4px;
}

/* Meeting message card button hover effects */
.meeting-message-card form button:hover {
  filter: brightness(0.95);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.meeting-message-card form button:active {
  transform: translateY(0);
}

/* Meeting card responsive */
@media (max-width: 600px) {
  .meeting-card-row {
    flex-direction: column;
    gap: 4px;
  }
  
  .meeting-card-label {
    min-width: auto;
  }
}

/* Chat badge pulse animation */
@keyframes pulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
  }
  50% { 
    transform: scale(1.15);
    opacity: 0.9;
  }
}

.pulse {
  animation: pulse 1.5s ease-in-out;
}

/* Inline style replacements - Security hardening */
/* Display utilities */
.inline-form {
  display: inline;
}

.hidden-input {
  display: none;
}

.flex-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flex-1 {
  flex: 1;
}

.flex-overflow {
  flex: 1;
  overflow-y: auto;
}

/* Chat specific styles */
.unread-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ff4444;
  border-radius: 50%;
  margin-left: 6px;
}

.chat-empty-state {
  padding: 16px;
  color: #999;
  text-align: center;
}

.file-attachment {
  margin-top: 8px;
}

.file-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

/* Meeting message styles */
.meeting-title {
  font-weight: 700;
  font-size: 15px;
  color: #0a66c2;
  margin-bottom: 8px;
}

.meeting-details {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.meeting-detail-item {
  margin-bottom: 4px;
}

.meeting-description {
  font-size: 13px;
  color: #444;
  padding-top: 8px;
  border-top: 1px solid #e5e5e5;
}

.meeting-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  gap: 8px;
}

.meeting-action-btn {
  width: 100%;
  border: none;
  padding: 10px 12px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.meeting-action-btn--accept {
  background: #22c55e;
  color: #fff;
}

.meeting-action-btn--reject {
  background: #ef4444;
  color: #fff;
}

.meeting-status {
  margin-top: 12px;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}

.meeting-status--accepted {
  background: #dcfce7;
  color: #16a34a;
}

.meeting-status--rejected {
  background: #fee2e2;
  color: #dc2626;
}

.meeting-status--pending {
  background: #fef3c7;
  color: #b45309;
}

/* Coach client detail styles */
.back-link {
  color: #0066cc;
  text-decoration: none;
}

.mb-30 {
  margin-bottom: 30px;
}

.journal-form-hidden {
  display: none;
}

.journal-content-hidden {
  display: none;
}

.pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.pagination-btn {
  padding: 8px 12px;
}

.pagination-current {
  padding: 8px 12px;
  background: #f0f0f0;
  border-radius: 5px;
}

.mt-40 {
  margin-top: 40px;
}

.files-header-hidden {
  display: none;
}

.files-button-group {
  display: flex;
  gap: 8px;
}

.files-upload-btn {
  padding: 10px 16px;
}

.files-delete-btn {
  padding: 8px 12px;
}

.empty-state-hidden {
  display: none;
}

.mt-20 {
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px;
}

.text-center {
  text-align: center;
}

.create-category-btn {
  padding: 12px 20px;
}

/* Client settings styles */
.mb-10 {
  margin-bottom: 10px;
}

.max-w-150 {
  max-width: 150px;
}

.br-4 {
  border-radius: 4px;
}

.db {
  display: block;
}

.ml-10 {
  margin-left: 10px;
}

/* Dashboard styles */
.messages-container {
  margin-bottom: 20px;
}

.card-mb-30 {
  margin-bottom: 30px;
}

/* Contact styles */
.error-text {
  color: #dc3545;
  font-size: 14px;
  margin-top: 5px;
}

.help-text {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Shared files styles */
.file-input-hidden {
  display: none;
}

.file-list-container {
  margin-top: 12px;
  max-height: 200px;
  overflow-y: auto;
}

/* File link with icon */
.file-link-primary {
  color: #0066cc;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

/* Video container */
.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 600px;
  background: #000;
}

