/* ============================================================
   Base Form & Element Styles
   ============================================================ */
/* General layout using Flexbox */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    display: flex;
    justify-content: space-between;
}
/* Main content area */
.main-content {
    flex: 1;
    margin-right: 20px; /* Space between main content and sidebar */
}
/* Sidebar for the download links */
.sidebar {
    width: 450px; /* Fixed width for the sidebar */
    display: flex;
    flex-direction: column; /* Stack the links vertically */
}
/* Styling for the download links */
.sidebar a {
    display: block;
    background-color: #555555; /* Grey background */
    color: white;
    padding: 10px 15px;
    text-align: center;
    font-size: 16px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px; /* 10px spacing between links */
    transition: background-color 0.3s ease;
}
.sidebar a:last-child {
    margin-bottom: 0; /* No spacing after the last link */
}
/* Hover effect for the download links */
.sidebar a:hover {
    background-color: #444444; /* Slightly darker grey on hover */
}
/* Styling for the hidden download button */
#downloadLink {
    display: none;
    background-color: #555555; /* Grey color as requested */
    color: white;
    padding: 10px 15px;
    text-align: center;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 10px; /* Added margin to move the button 10px down */
    width: 300px;
    box-sizing: border-box;
}
/* Styling for the hidden clipboard button */
#copyToClipboard {
    display: none;
    background-color: #555555; /* Grey color as requested */
    color: white;
    padding: 10px 15px;
    text-align: center;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 10px; /* Added margin to move the button 10px down */
    width: 300px;
    box-sizing: border-box;
}
/* Hover effect for the download button */
#downloadLink:hover {
    background-color: #444444; /* Slightly darker grey for hover effect */
}
/* Hover effect for the clipboard button */
#copyToClipboard:hover {
    background-color: #444444; /* Slightly darker grey for hover effect */
}
/* Styling for the URDS log output */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}
/* General styling for buttons */
button {
    background-color: #4CAF50; /* Green color */
    color: white;
    padding: 5px 10px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    margin-top: 10px;
}
button:hover {
    background-color: #45a049;
}
/* Styling for the refresh button */
#refreshButton {
    background-color: #008CBA; /* Blue color */
}
#latitude,
#longitude,
#height,
#timeOffset,
#gpxTimeOffset {
    width: 80px;
}
#timeOffset,
#gpxTimeOffset {
    width: 50px;
}
#saveCoordinates {
    background-color: #008CBA; /* Blue color */
    margin-left: 20px; /* Added left margin */
}
/* Hover effect for refresh button */
#refreshButton:hover {
    background-color: #007bb5; /* Darker blue */
}
/* Alert Styles */
.alert {
    padding: 10px;
    background-color: #f44336; /* Red */
    color: white;
    margin-bottom: 15px;
    border-radius: 5px;
    display: none; /* Hidden by default */
}
.alert.success {
    background-color: #4CAF50; /* Green */
}
.alert.error {
    background-color: #f44336; /* Red */
}
.alert.info {
    background-color: #2196F3; /* Blue */
}
.alert.warning {
    background-color: #ff9800; /* Orange */
}
h1 {
    font-size: 24px;
    color: #333;
}
h2 {
    font-size: 20px;
    color: #333;
}
label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}
/* Indent checkbox for "Add Station ID" by 100px */
label[for="addedStationId"] {
    margin-left: 100px;
}

/* ============================================================
   Highpoint's Webtools Panel Styles
   ============================================================ */
:root {
  --wt-bg: #ffffff;
  --wt-text: #222222;
  --wt-border: #cccccc;
  --wt-muted: #6b7280;
  --wt-chip-bg: #f3f4f6;
  --wt-chip-bg-hover: #e5e7eb;
  --wt-shadow: 0 10px 25px rgba(0,0,0,.10);
}

#webtools {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
  margin-top: -30px; /* Minimal offset */
  font-family: inherit;
}

#webtools-toggle {
  display: inline-block;
  background: var(--wt-bg);
  color: var(--wt-text);
  border: 1px solid var(--wt-border);
  padding: 8px 18px;
  border-radius: 0 0 10px 10px;         
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--wt-shadow);
}

#webtools-toggle:hover { background: var(--wt-chip-bg); }

#webtools-panel {
  width: 100%;
  max-width: 780px;
  margin-top: 8px;
  border: 1px solid var(--wt-border);
  background: var(--wt-bg);
  box-shadow: var(--wt-shadow);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  border-radius: 10px 10px 10px 10px;
  transition: max-height .25s ease, opacity .2s ease;
}

#webtools.open #webtools-panel {
  max-height: 330px;
  opacity: 1;
  margin-bottom: 8px;
}

#webtools-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 12px;
}

#webtools-links a {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--wt-text);
  background: var(--wt-chip-bg);
  border: 1px solid var(--wt-border);
  border-radius: 6px;
  transition: background .15s ease, transform .12s ease;
}
#webtools-links a:hover { background: var(--wt-chip-bg-hover); transform: translateY(-1px); }
#webtools-links .title { font-weight: 700; font-size: 14px; }
#webtools-links .desc  { color: var(--wt-muted); font-size: 12px; line-height: 1.2; }

/* ============================================================
   Layout fix for body/webtools positioning
   ============================================================ */
body { display: block !important; margin: 20px; }
#webtools { 
  width: 100% !important; 
  display: flex !important; 
  flex-direction: column !important; 
  align-items: center !important; 
  margin-bottom: 25px !important; /* Ensures the TEF heading is not overlapped */
}
.content-row { display: flex; justify-content: space-between; gap: 20px; }
.content-row .main-content { flex: 1 1 auto; margin-right: 0 !important; }
.content-row .sidebar { width: 450px; }
#webtools-panel { max-width: 750px; }