.rw-stats-table tr:nth-child(even) {
  background: #f9f9f9;
}

#rw-works:disabled {
    background: #f0f0f0;
    color: #666;
    cursor: not-allowed;
}

#rw-search:disabled {
    background: #f0f0f0;
    color: #666;
    cursor: not-allowed;
}

#rw-management:disabled {
    background: #f0f0f0;
    color: #666;
    cursor: not-allowed;
}


.rw-clear-btn {
    padding: 10px 8px;
    background: #447528;
    color: #fff;
    border: 2px solid #000000;
    border-radius: 0px;
    cursor: pointer;
    max-width: 120px;
    min-width: 120px;
    height: 50px;
    font-size: 16px;
    font-weight: 600;

}

.rw-clear-btn:hover {
    background: #4B822B;
}

.rw-popup-button {
    display: inline-block;
    padding: 8px 14px;
    background: #75c044;
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    margin-top: 8px;
}

.rw-popup-button:hover {
    background: #8ddd58;
}

.rw-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 12px;
}

.rw-popup-title {
    flex: 1;
}

.rw-popup-icon {
    width: 36px;
    height: 36px;
    margin-left: 12px;
    flex-shrink: 0;
}


#rw-info-popup {
    position: absolute;
    max-width: 280px;
    padding: 10px 12px;

    background: #ffffff;
    border: 1px solid #bdbdbd;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);

    font-size: 14px;
    line-height: 1.4;

    z-index: 9999;
    
    position: fixed;

}
.rw-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 16px;
    height: 16px;

    margin-left: 6px;

    font-size: 11px;
    font-weight: 600;

    color: #374151;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    border-radius: 2px;

    cursor: pointer;
}

.leaflet-popup-content-wrapper {
    border-radius: 0 !important;
}

.leaflet-popup-tip {
    border-radius: 0 !important;
}


.rw-subscribe-box {
    margin-top: 0cap;
    padding: 12px;
    background: #00afef2a;
    border: 1px solid #00aeef;
    border-radius: 4px;
}

.rw-subscribe-box h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: #003a8f;
}

.rw-subscribe-success {
    background: #e6f4ea;
    border: 1px solid #7fcf9b;
}

.rw-subscribe-success h3 {
    color: #1e7e34;
}

/* === Full‑width subscribe section === */

.rw-subscribe-full {
    width: 100%;
    margin-top: 10px;
}

.rw-subscribe-full .rw-subscribe-box {
    max-width: none;              /* remove card constraint */
    width: 100%;
    box-sizing: border-box;
}

/* Lay out input + button inline */
.rw-subscribe-full .rw-subscribe-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.rw-subscribe-full input[type="email"] {
    flex: 1;
    min-width: 260px;
}

.rw-subscribe-full button {
    height: 50px;
}

.rw-subscribe-desc {
    margin: 0 0 14px 0;
    font-size: 14px;
    color: #333;
}

.rw-subscribe-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rw-subscribe-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 16px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.rw-subscribe-form button {
    background: #75c044;
    color: #fff;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

.rw-subscribe-form button:hover {
    background: #5fa832;
}

.rw-subscribe-note {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.rw-section58 {
    margin-top: 20px;
}

.rw-section58-table {
    width: 100%;
    border-collapse: collapse;
}

.rw-section58-table th {
    text-align: left;
    padding: 8px;
    background: #f3f4f6;
    border-bottom: 2px solid #ddd;
}

.rw-section58-table td {
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.rw-section58-table tr:hover {
    background: #f9fafb;
}

.rw-stats-wrapper {
    padding: 12px 0;
}

.rw-stats-wrapper h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Stats table */
.rw-stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.rw-stats-table thead th {
    text-align: left;
    padding: 8px 10px;
    background: #f3f4f6;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    font-size: 0.95rem;
}

.rw-stats-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.rw-stats-table tbody tr:last-child td {
    border-bottom: none;
}

.rw-stats-table tbody tr:hover {
    background: #f9fafb;
}
.rw-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


.rw-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 16px;
    height: 16px;

    margin-left: 6px;

    font-size: 11px;
    font-weight: 600;
    font-family: Arial, sans-serif;

    color: #374151;            /* dark grey text */
    background-color: #e5e7eb; /* light grey box */
    border: 1px solid #d1d5db; /* subtle border */
    border-radius: 3px;        /* square-ish corners */

    cursor: help;
    line-height: 1;
}

.rw-info-icon:hover {
    color: #000;
}


.rw-filter label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 16px;
}

.rw-details-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 30px;
}

.rw-details-panel {
    overflow-x: auto;
}

.rw-details {
    width: 100%;
    border-collapse: collapse;
}

.rw-details th {
    text-align: left;
    padding: 6px 10px;
    vertical-align: top;
    width: 220px;
}

.rw-details td {
    padding: 6px 10px;
}

.rw-map-panel {
    height: 100%
}


.rw-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.rw-filters select,
.rw-filters input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  border: 2px solid #000000;
  border-radius: 0px;
  box-shadow: none;
  background-color: #fff;

  padding: 6px 8px;
  font-size: 0.9rem;

  min-width: 170px;
  
  box-sizing: border-box;
  font-weight: 300;
  height: 50px;
}

.rw-filters select:focus,
.rw-filters input:focus {
  outline: none;
  border-color: #005ea5; /* GOV-style blue */
  box-shadow: 0 0 0 2px rgba(0, 94, 165, 0.25);
}


.rw-table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
  background: #ffffff;
}

/* Let columns size naturally */
.rw-table {
  width: 100%;
  border-collapse: collapse;
}

/* Allow horizontal scrolling when needed */
.rw-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}


.rw-table th {
  background: #e6e6e6;
  text-align: left;
  padding: 6px 4px;
  border: 1px solid #ccc;
  font-size:14px;
}

.rw-table td {
  padding: 10px;
  border: 1px solid #ddd;
  vertical-align: top;
  font-size: 14px;
}

.rw-table tr:nth-child(even) {
  background: #f9f9f9;
}

.rw-table tbody tr {
  cursor: pointer;
}
  .rw-table tbody tr.is-active {
    background-color: #fff3cd; /* soft highlight */
  }

  .rw-table tbody tr.is-active td {
    border-top: 2px solid #f0ad4e;
    border-bottom: 2px solid #f0ad4e;
  }

  .rw-table tbody tr:nth-child(even) {
    background: #fafafa;
  }

  .rw-table tbody tr.is-active {
    background: #fff3cd;
    outline: 2px solid #f0ad4e;
  }

/* Responsibility column: allow wrapping */


/* --- Keep table header content on one line --- */
.rw-table thead th {
    position: relative;
    padding-right: 40px; /* room for icons */

}


.rw-table thead th .rw-info-icon {
    position: absolute;
    top: 10px;
    right: 20px;
}

.rw-th-title {
    display: block;
}



/* Smaller screens */
@media (max-width: 1400px) {
    .rw-table thead th {
        white-space: normal;
    }
    .rw-table td {
      padding: 10px;
      border: 1px solid #ddd;
      vertical-align: top;
      font-size: 12px;
    }
}

.rw-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;  
}
/* Prevent info icon from shrinking or wrapping */
.rw-info-icon {
  flex-shrink: 0;
}

/* Keep sort arrows inline with text */
.rw-table th[data-sort]::after {
    position: absolute;
    top: 10px;
    right: 5px;
    margin-left: 0;

}

.rw-view-toggle {
  margin-bottom: 0px;
  height: 40px;
}

.rw-view-toggle button {
  padding: 6px 12px;
  border: 0px solid #ccc;
  background: #f0f0f0;
  cursor: pointer;
  height: 100%;
  width: 260px;
  font-size: 22px;
  color: #999999
}

.rw-view-toggle button.active {
  background: #dfdfdf;
  color: #000000;
}

.rw-details {
    background: #f9f9f9;
}

.rw-toggle {
    background: #75c044;
    padding: 4px 8px;
    cursor: pointer;
    border: 0px;
}

.rw-toggle.hover {
    background: #89ce5c;
    padding: 4px 8px;
    cursor: pointer;
    border: 0px;
}

.entry-content {
  width: 100%;
}
.rw-main {
  margin-top: 0px;
  background: #dfdfdf;
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
}

.rw-table th[data-sort] {
  position: relative;
  user-select: none;
}

.rw-table th[data-sort]::after {
  content: '⇅';
  font-size: 12px;
  margin-left: 6px;
  color: #777;
}

#rw-map-wrapper {
  width: 100%;
}

#rw-map {
  width: 100%;
  min-width: 100%;
}


.rw-select {
  position: relative;
  display: inline-block;
  width: 100%;
}

.rw-select::after {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 16px;
  color: #000;
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #000;

}

/* Make room for the arrow */
.rw-select select {
  padding-right: 32px;
}

@media (max-width: 768px) {
  .rw-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .rw-filters select,
  .rw-filters input {
    min-width: 100%;
  }
  .rw-view-toggle button {
    width: 32%;
  }
  .rw-details-layout {
        grid-template-columns: 1fr;
    }

    .rw-map-panel,
    #rw-map {
        height: 300px !important; /* sensible mobile height */
        margin-top: 16px;
    }
    .rw-clear-btn {
      max-width: 100%;
      min-width: 100%;    
    }
  }
