/**
 * 📱 Social Media Integration Styles
 * Facebook & Twitter connections UI
 */

.social-container {
  padding: 20px;
  color: white;
  max-height: 100%;
  overflow-y: auto;
  /* No z-index needed - inherits stacking from .tab-content */
}

.social-container h3 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 1.5em;
}

.social-container p {
  /* Remove position: relative to prevent escape */
}

/* Platform Cards */
.social-platform-card {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 45, 0.95));
  border: 2px solid rgba(102, 126, 234, 0.5);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  /* No positioning - stays in normal flow */
}

.social-platform-card:hover {
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.platform-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

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

.platform-icon {
  font-size: 2em;
}

.platform-title h4 {
  color: white;
  margin: 0;
  font-size: 1.3em;
}

.coming-soon-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.7);
}

/* Social Profile Display */
.social-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(102, 126, 234, 0.1);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.social-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #667eea;
}

.social-info {
  flex: 1;
}

.social-info strong {
  color: white;
  font-size: 1.1em;
  display: block;
  margin-bottom: 5px;
}

.social-email {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9em;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
}

/* Test Message Section */
.test-message-section {
  background: linear-gradient(135deg, rgba(30, 30, 45, 0.95), rgba(40, 40, 55, 0.95));
  border: 2px solid rgba(102, 126, 234, 0.5);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  backdrop-filter: blur(10px);
  /* No positioning - stays in normal flow */
}

.test-message-section h4 {
  color: #667eea;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.test-message-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  padding: 12px;
  color: white;
  font-family: inherit;
  font-size: 1em;
  resize: vertical;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.test-message-input:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.8);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.test-message-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.test-message-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.char-count {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9em;
}

.char-count #messageCharCount {
  color: #667eea;
  font-weight: 600;
}

/* Message Preview */
.message-preview {
  margin-top: 20px;
}

.message-preview-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 2px solid rgba(102, 126, 234, 0.4);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #667eea;
}

.preview-header strong {
  color: white;
  display: block;
}

.preview-platform {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85em;
}

.preview-content {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.preview-footer {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85em;
  font-style: italic;
}

/* Messages */
.message {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  display: none;
  font-weight: 500;
}

.message.success {
  background: rgba(34, 197, 94, 0.2);
  border: 2px solid rgba(34, 197, 94, 0.5);
  color: #22c55e;
}

.message.error {
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.5);
  color: #ef4444;
}

/* Page Selection */
.pages-selection-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(102, 126, 234, 0.3);
}

.pages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-card {
  background: rgba(102, 126, 234, 0.1);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.page-card:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.5);
}

.page-card.selected {
  background: rgba(102, 126, 234, 0.25);
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.page-info {
  flex: 1;
}

.page-name {
  color: white;
  font-weight: 600;
  font-size: 1em;
  margin-bottom: 3px;
}

.page-category {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85em;
}

.page-check {
  color: #667eea;
  font-size: 1.2em;
  margin-left: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.page-card.selected .page-check {
  opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .social-container {
    padding: 15px;
  }

  .social-platform-card {
    padding: 15px;
  }

  .platform-title h4 {
    font-size: 1.1em;
  }

  .test-message-section {
    padding: 15px;
  }

  .test-message-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .btn-primary {
    width: 100%;
  }
}
