/* Custom styles for Social Media Publishing Platform */

/* Loading animations */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Platform-specific colors */
.platform-facebook { color: #1877F2; }
.platform-instagram { 
  background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.platform-twitter { color: #1DA1F2; }
.platform-linkedin { color: #0A66C2; }
.platform-tiktok { color: #000000; }

/* Social media preview styles */
.social-preview {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.facebook-preview {
  max-width: 500px;
  background: white;
  border: 1px solid #ddd;
}

.instagram-preview {
  max-width: 400px;
  background: white;
  border: 1px solid #dbdbdb;
}

.twitter-preview {
  max-width: 350px;
  background: white;
  border: 1px solid #cfd9de;
  border-radius: 16px;
}

.linkedin-preview {
  max-width: 450px;
  background: white;
  border: 1px solid #d0d0d0;
}

.tiktok-preview {
  max-width: 300px;
  background: black;
  color: white;
  aspect-ratio: 9/16;
}

/* Form enhancements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Button variations */
.btn-primary {
  background-color: #3b82f6;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-secondary {
  background-color: #10b981;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #059669;
}

.btn-outline {
  background-color: transparent;
  color: #3b82f6;
  padding: 0.75rem 1.5rem;
  border: 2px solid #3b82f6;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  background-color: #3b82f6;
  color: white;
}

/* Card styles */
.card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
}

/* Status badges */
.status-draft { 
  background-color: #f3f4f6; 
  color: #374151; 
}

.status-scheduled { 
  background-color: #dbeafe; 
  color: #1d4ed8; 
}

.status-published { 
  background-color: #d1fae5; 
  color: #065f46; 
}

.status-failed { 
  background-color: #fee2e2; 
  color: #991b1b; 
}

.status-needs-approval { 
  background-color: #fef3c7; 
  color: #92400e; 
}

.status-approved { 
  background-color: #d1fae5; 
  color: #065f46; 
}

/* Toast notifications */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  padding: 1rem;
  border-left: 4px solid #10b981;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.warning {
  border-left-color: #f59e0b;
}

/* Responsive design */
@media (max-width: 768px) {
  .social-preview {
    max-width: 100%;
  }
  
  .grid-cols-responsive {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .grid-cols-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cols-responsive {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Hashtag styling */
.hashtag {
  color: #3b82f6;
  font-weight: 500;
}

.mention {
  color: #3b82f6;
  font-weight: 500;
}

/* Platform character limits */
.character-count {
  font-size: 0.875rem;
  color: #6b7280;
}

.character-count.warning {
  color: #f59e0b;
}

.character-count.error {
  color: #ef4444;
}

/* Drag and drop styling */
.dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  transition: border-color 0.2s;
}

.dropzone.dragover {
  border-color: #3b82f6;
  background-color: #f8fafc;
}

/* Calendar styling */
.calendar-day {
  min-height: 120px;
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
}

.calendar-day.has-posts {
  background-color: #f0f9ff;
}

.calendar-post {
  background-color: #3b82f6;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-in-right {
  animation: slideInRight 0.3s ease-in-out;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Scrollbar styling */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}