/* Custom Styles for Sosh */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Line clamp utility */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Smooth transitions */
* {
  transition: all 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #9333ea;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #7e22ce;
}

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

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #9333ea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Card hover effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(to right, #9333ea, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Platform icons */
.platform-icon {
  transition: transform 0.2s ease;
}

.platform-icon:hover {
  transform: scale(1.1);
}

/* Responsive grid */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
  }
}

/* Success/Error messages */
.message-success {
  background-color: #10b981;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.message-error {
  background-color: #ef4444;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Button styles */
.btn-primary {
  background: linear-gradient(to right, #9333ea, #ec4899);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 10px 20px rgba(147, 51, 234, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  background: white;
  color: #9333ea;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  border: 2px solid #9333ea;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #f3e8ff;
}

/* Status badges */
.badge {
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-draft {
  background-color: #e5e7eb;
  color: #374151;
}

.badge-scheduled {
  background-color: #dbeafe;
  color: #1e40af;
}

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

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

/* Calendar styles */
.calendar-day {
  min-height: 100px;
  border: 1px solid #e5e7eb;
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.calendar-day:hover {
  background-color: #f9fafb;
}

.calendar-day.today {
  background-color: #faf5ff;
  border-color: #9333ea;
}

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

/* Form inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
input[type="number"],
textarea,
select {
  font-family: inherit;
}

/* Focus states */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  ring: 2px solid #9333ea;
  border-color: transparent;
}

/* Checkbox custom style */
input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

input[type="checkbox"]:checked {
  background-color: #9333ea;
  border-color: #9333ea;
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #1f2937;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state i {
  font-size: 4rem;
  color: #d1d5db;
  margin-bottom: 16px;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .modal-content {
    width: 95%;
    padding: 16px;
  }
  
  .grid-responsive {
    grid-template-columns: 1fr !important;
  }
}
