/* Match Detail Page Styles */

.kerlackilive-match-detail-container {
  display: flex;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  min-height: 600px;
}

/* Chat Sidebar (Left) */
.kerlackilive-chat-sidebar {
  width: 300px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 100px);
  position: sticky;
  top: 20px;
}

.kerlackilive-chat-header {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kerlackilive-chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.kerlackilive-chat-count {
  font-size: 12px;
  color: #666;
}

.kerlackilive-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kerlackilive-chat-message {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 8px;
}

.kerlackilive-chat-message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.kerlackilive-chat-username {
  font-weight: 600;
  font-size: 13px;
  color: #1a73e8;
}

.kerlackilive-chat-time {
  font-size: 11px;
  color: #999;
}

.kerlackilive-chat-message-text {
  font-size: 14px;
  color: #333;
  word-wrap: break-word;
}

.kerlackilive-chat-empty {
  text-align: center;
  color: #999;
  padding: 40px 20px;
}

.kerlackilive-chat-input {
  padding: 16px;
  border-top: 1px solid #e0e0e0;
}

.kerlackilive-chat-input form {
  display: flex;
  gap: 8px;
}

.kerlackilive-chat-input input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.kerlackilive-chat-input button {
  background: #1a73e8;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kerlackilive-chat-input button:hover {
  background: #1557b0;
}

.kerlackilive-chat-login {
  padding: 16px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.kerlackilive-chat-login a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 600;
}

/* Main Content */
.kerlackilive-match-main {
  flex: 1;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 24px;
}

.kerlackilive-match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.kerlackilive-match-league {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kerlackilive-match-league img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.kerlackilive-match-league span {
  font-weight: 600;
  font-size: 16px;
}

.kerlackilive-match-date {
  color: #666;
  font-size: 14px;
}

.kerlackilive-match-score-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 20px;
  margin-bottom: 32px;
}

.kerlackilive-team-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.kerlackilive-team-display img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.kerlackilive-team-display h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

.kerlackilive-score-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.kerlackilive-score-numbers {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 48px;
  font-weight: 700;
}

.kerlackilive-score-separator {
  color: #ccc;
}

.kerlackilive-live-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ff4444;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.kerlackilive-live-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

.kerlackilive-finished-status,
.kerlackilive-scheduled-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.kerlackilive-finished-status {
  background: #4caf50;
  color: white;
}

.kerlackilive-scheduled-status {
  background: #f5f5f5;
  color: #666;
}

.kerlackilive-events-timeline h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
}

.kerlackilive-events-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kerlackilive-event-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #1a73e8;
}

.kerlackilive-event-item.goal,
.kerlackilive-event-item.penalty {
  border-left-color: #4caf50;
}

.kerlackilive-event-item.yellow_card {
  border-left-color: #ffc107;
}

.kerlackilive-event-item.red_card {
  border-left-color: #f44336;
}

.kerlackilive-event-minute {
  font-weight: 700;
  font-size: 16px;
  color: #1a73e8;
  min-width: 40px;
}

.kerlackilive-event-icon {
  font-size: 24px;
}

.kerlackilive-event-details {
  flex: 1;
}

.kerlackilive-event-team {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.kerlackilive-event-player {
  font-size: 14px;
  color: #666;
}

.kerlackilive-event-description {
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}

.kerlackilive-no-events {
  text-align: center;
  padding: 40px;
  color: #999;
}

/* Banner Sidebar (Right) */
.kerlackilive-banner-sidebar {
  width: 300px;
  position: sticky;
  top: 20px;
  height: fit-content;
}

.kerlackilive-banner-container {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 16px;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kerlackilive-banner-placeholder {
  text-align: center;
  color: #999;
}

.kerlackilive-banner-placeholder p {
  margin: 0 0 8px 0;
  font-weight: 600;
}

.kerlackilive-banner-placeholder small {
  font-size: 12px;
}

/* Modal Styles */
.kerlackilive-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kerlackilive-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.kerlackilive-modal-content {
  position: relative;
  width: 95%;
  max-width: 1400px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.kerlackilive-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}

.kerlackilive-modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

#kerlackilive-modal-body {
  overflow-y: auto;
  flex: 1;
}

.kerlackilive-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.kerlackilive-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1a73e8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 1200px) {
  .kerlackilive-modal-content {
    width: 98%;
    max-height: 95vh;
  }

  .kerlackilive-match-detail-container {
    flex-direction: column;
  }

  .kerlackilive-chat-sidebar,
  .kerlackilive-banner-sidebar {
    width: 100%;
    position: static;
    height: auto;
  }

  .kerlackilive-chat-sidebar {
    height: 400px;
  }

  .kerlackilive-banner-container {
    min-height: 250px;
  }
}

@media (max-width: 768px) {
  .kerlackilive-modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .kerlackilive-match-detail-container {
    padding: 16px;
  }

  .kerlackilive-match-score-display {
    flex-direction: column;
    gap: 24px;
    padding: 24px 16px;
  }

  .kerlackilive-score-numbers {
    font-size: 36px;
  }

  .kerlackilive-team-display img {
    width: 60px;
    height: 60px;
  }

  .kerlackilive-team-display h2 {
    font-size: 18px;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
