/* ====================================
   TICKER EDITOR - CMS STYLING
   ==================================== */

/* Editor Panel - Modal Overlay */
.ticker-editor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
}

.ticker-editor-overlay.active {
  display: flex;
}

/* Editor Panel */
.ticker-editor-panel {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border-radius: 20px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 2px solid #3b82f6;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.ticker-editor-header {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.ticker-editor-header h2 {
  margin: 0;
  color: white;
  font-size: 24px;
  font-weight: 700;
}

.ticker-editor-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ticker-editor-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Content Area */
.ticker-editor-content {
  padding: 30px;
  max-height: calc(90vh - 180px);
  overflow-y: auto;
}

/* Event List */
.ticker-event-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

/* Single Event Item */
.ticker-event-item {
  background: rgba(31, 41, 55, 0.8);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 20px;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 15px;
  align-items: center;
  transition: all 0.3s ease;
}

.ticker-event-item:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* Event Icon */
.ticker-event-icon {
  font-size: 32px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 10px;
  padding: 10px;
}

/* Event Details */
.ticker-event-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ticker-event-details input,
.ticker-event-details textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.ticker-event-details input:focus,
.ticker-event-details textarea:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.1);
}

.ticker-event-details input::placeholder,
.ticker-event-details textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.ticker-event-title {
  font-weight: 600;
  font-size: 16px;
}

.ticker-event-date {
  font-size: 14px;
  width: 150px;
}

.ticker-event-description {
  font-size: 14px;
  resize: vertical;
  min-height: 40px;
}

/* Event Actions */
.ticker-event-actions {
  display: flex;
  gap: 10px;
}

.ticker-btn-delete {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ticker-btn-delete:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Add New Event Button */
.ticker-btn-add {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.ticker-btn-add:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Footer Buttons */
.ticker-editor-footer {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px 30px;
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.ticker-btn-save {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker-btn-save:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.ticker-btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 12px 30px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.ticker-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Success/Error Messages */
.ticker-message {
  position: fixed;
  top: 100px;
  right: 30px;
  padding: 15px 25px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 9999;
  animation: slideInRight 0.3s ease-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.ticker-message.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.ticker-message.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* Edit Button on Ticker */
.ticker-edit-button {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  z-index: 46;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ticker-edit-button:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Scrollbar Styling */
.ticker-editor-content::-webkit-scrollbar {
  width: 8px;
}

.ticker-editor-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.ticker-editor-content::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 10px;
}

.ticker-editor-content::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .ticker-editor-panel {
    width: 95%;
    max-height: 95vh;
  }
  
  .ticker-editor-header {
    padding: 15px 20px;
  }
  
  .ticker-editor-header h2 {
    font-size: 20px;
  }
  
  .ticker-editor-content {
    padding: 20px;
  }
  
  .ticker-event-item {
    grid-template-columns: 50px 1fr;
    gap: 10px;
  }
  
  .ticker-event-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  
  .ticker-edit-button {
    position: static;
    transform: none;
    margin: 5px;
  }
  
  .ticker-message {
    right: 10px;
    left: 10px;
    top: 80px;
  }
}
