﻿/* ====== Base ====== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f6f9;
  overflow: hidden; /* prevent page scroll; panels scroll instead */
}

/* ====== Main Layout ====== */
.main-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: #fff;
}

/* Left panel: My FPL Team */
#my-team {
  flex: 0 0 20%;               /* default 20% width, resizable via JS */
  background: #ffffff;
  border-right: 4px solid #007bff;
  padding: 10px;
  overflow-y: auto;
}

#my-team h3 {
  color: #007bff;
  border-bottom: 2px solid #007bff;
  margin: 8px 0 10px;
  padding-bottom: 4px;
  font-size: 1.1rem;
}

/* Right side wrapper (split vertically into 2 rows) */
.right-side {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

/* Right rail for social feed */
#social-rail {
  flex: 0 0 18%;
  min-width: 260px;
  max-width: 420px;
  border-left: 4px solid #007bff;
  background: #ffffff;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
}

#social-rail h3 {
  color: #007bff;
  border-bottom: 2px solid #007bff;
  margin: 8px 0 10px;
  padding-bottom: 4px;
  font-size: 1.05rem;
}

#social-rail .twitter-timeline {
  flex: 1 1 auto;
}

#twitter-container {
  flex: 1 1 auto;
}

/* Top: FPL table */
#stats-section {
  flex: 0 0 70%;               /* default 70% height of right side, resizable via JS */
  border-bottom: 4px solid #007bff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#stats-section h2 {
  background: #007bff;
  color: #fff;
  text-align: center;
  margin: 0;
  padding: 10px 8px;
  font-size: 1.15rem;
}

#table-container {
  flex: 1 1 auto;
  min-height: 0;               /* allow inner scroll */
  overflow: auto;
  padding: 8px;
}

/* Bottom: Player Details (formerly suggestions) */
#suggestions {
  flex: 1 1 auto;              /* takes remaining space */
  overflow: auto;
  padding: 10px;
  background: #fff;
}

#suggestions h3 {
  color: #007bff;
  border-bottom: 2px solid #007bff;
  margin: 8px 0 10px;
  padding-bottom: 4px;
  font-size: 1.1rem;
}

/* ====== Resizers ====== */
.resizer {
  background: #007bff;
  transition: background 0.15s ease-in-out;
  z-index: 5;
}

.resizer:hover {
  background: #0056b3;
}

.resizer.vertical {
  width: 6px;
  cursor: col-resize;
}

.resizer.horizontal {
  height: 6px;
  cursor: row-resize;
}

/* ====== Cards (Team list & generic player card) ====== */
.player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid #e6eefc;
  transition: background 0.2s ease;
}

.player-card:hover {
  background: #e9f5ff;
}

.player-card img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #cfd6e4;
}

/* ====== Player Details panel ====== */
#player-details {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 10px;
  overflow-y: auto;
  max-height: 100%;
  border: 1px solid #e6eefc;
}

#player-details .player-card img {
  width: 80px;
  height: 80px;
  border: 2px solid #007bff;
}

#player-details h5 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
}

#player-details table {
  background: #ffffff;
}

/* ====== DataTables tweaks ====== */
table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
  font-size: 13px;
}

table.dataTable thead th {
  background: #f1f3f6;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid #e5e7eb;
}

table.dataTable tbody td {
  vertical-align: middle;
}

/* Highlight rows for players in My FPL Team */
.in-my-team {
  background-color: #fff8d8 !important; /* soft highlight */
}

/* ====== Scrollbar (nice look) ====== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background: #eef2f7;
}

/* ====== Responsive (stack if very narrow) ====== */
@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
  }

  #my-team {
    flex: 0 0 35vh;        /* top block in small screens */
    border-right: none;
    border-bottom: 4px solid #007bff;
  }

  .resizer.vertical {
    height: 6px;
    width: 100%;
    cursor: row-resize;
  }

  .right-side {
    flex: 1 1 auto;
  }

  #stats-section {
    flex: 0 0 55%;
  }

  /* Stack social rail under the main content on narrow screens */
  #social-rail {
    flex: 0 0 auto;
    min-width: 100%;
    max-width: 100%;
    border-left: none;
    border-top: 4px solid #007bff;
  }
}/* Filter inputs in DataTables header */
#fplTable thead tr.filters th {
  padding: 2px 4px;
  background-color: #f9fafc;
}

#fplTable thead tr.filters input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 11px;
  padding: 2px;
}

/* Forecast table filter styling */
#forecastTable thead tr.filters th {
  padding: 2px 4px;
  background-color: #f9fafc;
}

#forecastTable thead tr.filters input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 11px;
  padding: 2px;
}
/* ====== Bottom-right logo ====== */
#bottom-logo {
  position: fixed;
  bottom: 15px;
  right: 20px;
  width: 37px !important;  /* 3x smaller than previous (110px) */
  height: auto !important; /* keep aspect ratio */
  opacity: 0.9;
  z-index: 1000;
  transition: opacity 0.3s;
}

#bottom-logo:hover {
  opacity: 1;
}
