/* Messaging-specific styles for mobile optimization */

/* Team Selection Styles */
.team-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 12px !important;
}

.team-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.team-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.team-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Message Thread Styles */
.message-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f8f9fa;
}

.message-header {
  background: white;
  border-bottom: 1px solid #e9ecef;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.message-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  padding-bottom: 0;
}

.message-bubble {
  max-width: 75%;
  margin-bottom: 1rem;
  position: relative;
}

.message-bubble.sent {
  align-self: flex-end;
  margin-left: auto;
}

.message-bubble.received {
  align-self: flex-start;
  margin-right: auto;
}

.message-content {
  padding: 0.75rem 1rem;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
}

.message-bubble.sent .message-content {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-bubble.received .message-content {
  background: white;
  color: #212529;
  border: 1px solid #e9ecef;
  border-bottom-left-radius: 4px;
}

.message-sender {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

.message-bubble.sent .message-sender {
  color: rgba(255, 255, 255, 0.9);
}

.message-bubble.received .message-sender {
  color: #6c757d;
}

.message-text {
  line-height: 1.4;
  margin: 0;
}

.message-time {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 0.25rem;
  text-align: right;
}

.message-bubble.sent .message-time {
  color: rgba(255, 255, 255, 0.8);
}

.message-bubble.received .message-time {
  color: #6c757d;
}

/* Message Input Styles */
.message-input-container {
  background: white;
  border-top: 1px solid #e9ecef;
  padding: 1rem;
  position: sticky;
  bottom: 0;
}

.message-form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.message-textarea {
  flex: 1;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  padding: 0.75rem 1rem;
  resize: none;
  font-size: 0.95rem;
  line-height: 1.4;
  max-height: 100px;
  min-height: 44px;
}

.message-textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.message-submit {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.message-submit:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.message-submit:active {
  transform: scale(0.95);
}

/* Empty State */
.empty-messages {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-messages i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .message-bubble {
    max-width: 85%;
  }
  
  .message-content {
    padding: 0.625rem 0.875rem;
  }
  
  .message-input-container {
    padding: 0.75rem;
  }
  
  .message-form {
    gap: 0.5rem;
  }
  
  .message-textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* iOS-specific optimizations */
@supports (-webkit-touch-callout: none) {
  .message-container {
    height: 100vh;
    height: -webkit-fill-available;
  }
  
  .message-input-container {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* Smooth scrolling for messages */
.messages-list {
  scroll-behavior: smooth;
}

/* Loading states */
.message-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Typing indicator */
.typing-indicator {
  padding: 0.5rem 1rem;
  color: #6c757d;
  font-size: 0.875rem;
  font-style: italic;
} 