/* Test style to verify CSS loading */
body {
    background-color: #f8f9fa !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Root variables */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --header-bg: #343a40;
    --header-text: #ffffff;
    --font-family: 'Roboto', sans-serif;
    --border-color: #e0e0e0;
}

/* Reset and base styles */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: #333;
}

/* Header styles */
.header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    text-align: center;
}

/* Search container */
.search-container {
    margin-top: 60px;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

/* Map container */
.map-container {
    position: relative;
    height: calc(100vh - 200px);
    margin: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ensure map-controls bar is always visible above the map */
.map-controls {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 20;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 10px 18px;
    font-size: 1rem;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    margin-top: 0;
    margin-bottom: 0;
}

/* Controls container */
.controls-container {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.mode-buttons, .action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.mode-button, .action-button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

.mode-button.deck {
    background-color: var(--primary-color);
    color: white;
}

.mode-button.pool {
    background-color: var(--secondary-color);
    color: white;
}

.action-button.clear {
    background-color: #dc3545;
    color: white;
}

.action-button.done {
    background-color: #28a745;
    color: white;
}

/* Measurement panel */
.measurement-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.depth-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    max-width: 120px;
}

.upload-button, .download-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.upload-button {
    background-color: var(--primary-color);
    color: white;
}

.download-button {
    background-color: var(--secondary-color);
    color: white;
}

/* Loading indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 2000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .search-container {
        margin-top: 50px;
        padding: 0.75rem;
    }

    .map-container {
        height: calc(100vh - 180px);
        margin: 0.75rem;
    }

    .controls-container {
        bottom: 70px;
        padding: 0.75rem;
    }

    .mode-button, .action-button {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .measurement-panel {
        padding: 0.75rem;
    }

    .depth-input {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .upload-button, .download-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Small screen adjustments */
@media (max-width: 360px) {
    .header h1 {
        font-size: 1.1rem;
    }

    .mode-button, .action-button {
        padding: 0.4rem;
        font-size: 0.8rem;
    }

    .measurement-panel {
        padding: 0.5rem;
    }

    .depth-input {
        padding: 0.4rem;
        font-size: 0.8rem;
    }

    .upload-button, .download-button {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* constrain both logos to the same height */
/* ensure .logo-container uses flex and centers items */
header .logo-container {
  display: flex !important;
  align-items: center !important;
  gap: 3rem;             /* space between logos */
}

/* aggressively constrain both logos */
header .logo-container img.site-logo {
  max-height: 100px !important;  /* lock the height */
  height: auto !important;      /* preserve aspect ratio */
  width: auto !important;       /* preserve aspect ratio */
  object-fit: contain !important;
  display: inline-block !important;
}

.header-actions {
  position: absolute;
  top: 15px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}
.user-greet {
  font-weight: 500;
}
.dropdown-btn {
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
}
.account-menu {
  position: relative;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;   /* immediately below the button */
  right: 0;
  margin: 0;   /* no extra gap */
  padding: 0;
  background-color: var(--header-bg);
  border: 1px solid #444;
  border-radius: 4px;
  list-style: none;
  min-width: 160px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 1000;
  pointer-events: auto;
}
.account-menu:hover .dropdown-menu,
.account-menu:focus-within .dropdown-menu {
  display: block;
}
.account-menu:hover .dropdown-menu {
  display: block;
}
.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--header-text);
  text-decoration: none;
  font-size: 0.95rem;
}
.dropdown-menu li a:hover {
  background-color: var(--button-hover);
  color: var(--button-text);
}
.job-creator {
  font-weight: bold;
  color: var(--primary-hover);
  background-color: var(--secondary-color);
  padding: 2px 4px;
  border-radius: 3px;
  margin-left: 6px;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

/* New small button style */
.btn-small {
  background-color: var(--primary-color);
  border: none;
  border-radius: 4px;
  color: #fff;
  padding: 4px 8px;
  margin: 2px 0;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  width: auto;
  box-sizing: border-box;
}

.btn-small:hover {
  background-color: var(--primary-hover);
}

/* Toast notification styles */
.toast-container {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.toast {
  min-width: 220px;
  max-width: 90vw;
  margin: 0.5rem 0;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  color: #fff;
  background: #323232;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.success {
  background: #28a745;
}
.toast.error {
  background: #dc3545;
}

/* New styles for the address container in the header */
.address-container {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 500px;
}

.address-container input {
  width: 80%;
  padding: 8px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.address-container {
  width: 100%;
  max-width: 500px;  /* adjust as needed */
  margin: 10px auto 0 auto;  /* centers the container */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.address-container button:hover {
  transform: scale(1.1);
}

/* Notification styling */
.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background-color: var(--primary-color);
  color: #fff;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 1000;
}

.notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* Header */
.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 15px;
  position: relative;
  background-color: #343a40;  /* grey */
  color: #fff;
  z-index: 1000;
}

.header-content {
  width: 100%;
}

.app-header h1 {
  margin: 0;
  color: #fff;
  font-size: 1.8rem;
}

/* Header Actions */
.header-actions button,
.header-nav button,
.btn {
  background-color: var(--primary-color);
  border: none;
  border-radius: 4px;
  color: #fff;
  padding: 10px 15px;
  margin: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-actions button:hover,
.header-nav button:hover,
.btn:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Input fields */
input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background-color: #5C5C5C;
  margin-bottom: 10px;
  font-size: 1rem;
  box-sizing: border-box;
}

/* Main Layout */
.app-container {
  display: flex;
  height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
  width: 220px;  /* Adjust this width as needed */
  padding: 15px;
  background-color: #343a40;  /* grey */
  color: #fff;
  overflow-y: auto;
}


/* Sidebar button styling: make them block elements that fill the container */
.sidebar button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: #5C5C5C;
  border: none;
  border-radius: 4px;
  color: #fff;
  padding: 8px 10px;
  margin: 10px 0;
  font-size: .9rem;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.sidebar input {
  background-color: #5C5C5C;
  color: #fff;
  border: 1px solid #6c757d;
  border-radius: 4px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

.sidebar button:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.metrics-output {
  background-color: #fff; /* or another background if needed */
  color: #333;           /* dark text for readability on white */
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.result-output {
  background-color: #fff; /* or another background if needed */
  color: #333;           /* dark text for readability on white */
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

/* Metrics output */
.metrics-output {
  margin-top: 10px;
  background-color: #fff;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* Footer */
footer {
  background-color: var(--header-bg);
  color: var(--header-text);
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 4px;
  width: 90%;
  max-width: 500px;
}

.modal-content .close {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
}

.menu-toggle {
  display: none;
}

/* 1. Table → Cards on small screens */
@media (max-width: 600px) {
  /* Hide the native table */
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead {
    display: none;
  }
  tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
  }
  td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
  }
  td::before {
    /* pulled from data-label attribute */
    content: attr(data-label);
    font-weight: 600;
    color: var(--secondary-color);
    flex: 1;
  }
  td:last-child {
    justify-content: flex-end;
  }
}

/* 2. Bigger pagination buttons */
.pagination button {
  min-width: 48px;
  min-height: 48px;
  font-size: 1.5rem;
  padding: 0;
}

/* 3. Hamburger menu for header-actions */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--header-text);
  cursor: pointer;
}
@media (max-width: 600px) {
  .menu-toggle {
    display: block;
  }
  .header-actions {
    display: none !important;
  }
  .header-actions.active {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--header-bg);
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
}

.map-controls label {
  margin: 0 0.5rem 0 1rem;
  font-size: 1rem;
  color: #333;
}

.map-controls input {
  width: 80px;
  font-size: 1rem;
  padding: 4px 10px;
  height: 34px;
}

.map-controls .btn-small {
  padding: 8px 16px;
  font-size: 1rem;
  margin: 3px 0;
}

.sidebar .btn-small {
  padding: 5px 8px;
  margin: 2px 0;
  font-size: 0.88rem;
}

.monday-search {
  margin-bottom: 0.5rem;
}
.search-results-wrapper {
  margin-bottom: 0 !important;
}

.sidebar, .sidebar .result-output, .sidebar .metrics-output {
  color: #444;
}
.sidebar a {
  color: #0073ea;
}

.board-badge.cnc-submissions {
  background-color: #43a047;
}

@media (max-width: 480px) {
  .measurement-panel {
    padding: 0.4rem;
    gap: 4px;
  }
  .depth-input {
    padding: 0.3rem;
    font-size: 0.85rem;
    max-width: 70px;
  }
  .download-button, .upload-button {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    max-width: 90px;
    min-width: 70px;
  }
  .result-output {
    font-size: 0.9rem;
    padding: 8px;
    min-width: 120px;
    max-width: 100vw;
    word-break: break-word;
  }
}

