/* Custom styles for Phaune Radio Dashboard */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cabin+Sketch:wght@400;700&display=swap');

/* Global styles matching Phaune Radio branding */
:root {
  --phaune-green: #839224;
  --phaune-light-green: #CCD0AF;
  --phaune-bg: #FBFCF9;
  --phaune-text: #333333;
  --phaune-accent: #A8BAB1;
}

body {
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--phaune-bg);
  color: var(--phaune-text);
  background-image: url("https://phauneradio.com/wp-content/uploads/tile.jpg");
}

/* Header styling */
header {
  position: relative;
}

header .h2 {
  font-family: 'Cabin Sketch', cursive;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--phaune-text);
}

header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(135deg, var(--phaune-green) 0%, transparent 80%);
}

/* Card styling to match Phaune Radio */
.card {
  background-color: white;
  border: none;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-header {
  border-bottom: none;
  padding: 15px;
  background-color: var(--phaune-green);
}

.card-header h5 {
  font-family: 'Cabin Sketch', cursive;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin: 0;
}

/* Table styling */
.table {
  margin-bottom: 0;
  color: var(--phaune-text);
}

.table th {
  font-weight: 700;
  border-top: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
  color: var(--phaune-green);
}

.table-hover tbody tr:hover {
  background-color: rgba(131, 146, 36, 0.05);
}

/* City links styling */
.city-link {
  color: var(--phaune-green);
  text-decoration: none;
  position: relative;
  transition: all 0.2s;
  font-weight: 500;
}

.city-link:hover {
  color: #6d7a1e;
  text-decoration: none;
}

.city-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--phaune-green);
  transition: width 0.3s ease;
}

.city-link:hover::after {
  width: 100%;
}

/* Main listener counter */
.listeners-count {
  font-family: 'Cabin Sketch', cursive;
  font-size: 5rem;
  font-weight: 700;
  color: var(--phaune-green);
  line-height: 1;
  padding: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.listeners-count::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: var(--phaune-light-green);
}

/* Track information styling */
.track-container {
  border: 1px solid rgba(131, 146, 36, 0.2);
  border-radius: 4px;
  transition: all 0.2s;
  background-color: rgba(255, 255, 255, 0.7);
  min-height: 120px;
  display: flex;
  flex-direction: column;
}

.track-container:hover {
  border-color: var(--phaune-green);
  background-color: rgba(255, 255, 255, 1);
}

.track-title {
  font-family: 'Cabin Sketch', cursive;
  font-weight: 700;
  color: var(--phaune-green);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(131, 146, 36, 0.2);
}

#current, #next, #previous {
  flex-grow: 1;
  word-wrap: break-word;
  white-space: normal;
  line-height: 1.4;
  font-size: 0.95rem;
}

/* Button styling */
.btn-phaune {
  background-color: var(--phaune-green);
  border-color: var(--phaune-green);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  transition: all 0.2s;
}

.btn-phaune:hover {
  background-color: #6d7a1e;
  border-color: #6d7a1e;
  color: white;
}

/* Responsive table adjustments */
@media (max-width: 576px) {
  .table-responsive {
    max-height: 300px;
    overflow-y: auto;
  }
  
  header .h2 {
    font-size: 1.5rem;
  }
  
  .listeners-count {
    font-size: 4rem;
  }
  
  .track-container {
    min-height: 100px;
  }
}

/* Animation for track updates */
@keyframes highlight {
  0% { background-color: rgba(131, 146, 36, 0.2); }
  100% { background-color: transparent; }
}

.highlight {
  animation: highlight 2s ease-in-out;
}

/* Animation for listeners count */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

#listeners.highlight {
  animation: pulse 1s ease-in-out;
}

/* Footer styling */
footer {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  color: #888;
  font-size: 0.9rem;
}

footer a {
  color: var(--phaune-green);
  text-decoration: none;
}

footer a:hover {
  color: #6d7a1e;
  text-decoration: underline;
}

/* Fix for flag icons */
.fi {
  box-shadow: 0 0 1px rgba(0,0,0,0.2);
  display: inline-block;
  width: 1.33em;
  height: 1em;
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
  position: relative;
  
  /* Fallback styling in case the icon doesn't load */
  min-width: 16px;
}

/* Provide a fallback style if flag doesn't load */
.flag-icon::before {
  content: '🌍';
  opacity: 0;
}

.flag-icon:not([class*="flag-icon-"]),
.flag-icon.flag-icon-undefined,
.flag-icon.flag-icon-null,
.flag-icon.flag-icon- {
  opacity: 0.4;
}

.flag-icon:not([class*="flag-icon-"])::before,
.flag-icon.flag-icon-undefined::before,
.flag-icon.flag-icon-null::before,
.flag-icon.flag-icon-::before {
  opacity: 1;
}

/* Refresh indicator */
.refresh-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--phaune-green);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.refresh-indicator.show {
  opacity: 1;
}