/* Variables for consistent styling */
:root {
    --primary-color: #004422;
    --highlight-color: #52910E;
    --highlight-light: #66B512;
    --text-dark: #1A1A1A;
    --text-secondary: #666666;
    --text-light: #FFFFFF;
    --border-color: #CCCCCC;
    --background-light: #F7F7F7;
    --background-green-light: #F7FBF3;
    --low-risk-color: #66B512;
    --row-background: white;
    --alt-row-background: var(--background-light);
}

/* Base styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'SF Pro Display', Arial, sans-serif;
}

body {
    background-color: white;
}

.app-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent whole page scrolling */
}

/* Header styling */
.header {
    width: 100%;
    height: 60px;
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    flex-shrink: 0;
}

.logo {
    width: auto;
    height: 45px;
}

.logout-container {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 16px;
}

.logout-icon {
    width: 21.78px;
    height: 18.15px;
    border: 1px solid white;
    margin-right: 10px;
}

/* Main content styling */
.main-content {
    flex: 1;
    display:flex;
    flex-direction: column;
    overflow: hidden;
    min-height:0;
    padding: 20px 24px;
}

.navigation-container {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.continue-container {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-bottom: 24px;
}
.top-info-container {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}
/* Push the third item (and items after it) to the right */
.top-info-container  > :nth-child(3) {
  margin-left: auto;
}
.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--highlight-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background-color: white;
    color: var(--highlight-color);
}

.forward-button {
    display: inline-block; /* or flex if needed */
    vertical-align: middle; /* old-school fix for inline elements */
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--highlight-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background-color: var(--highlight-color);
    color: white;
    }
.to_farmer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--highlight-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background-color: var(--highlight-color);
    color: white;
    }



.scenario-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.save-scenario-btn {
    background-color: #4CAF50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.save-scenario-btn:hover {
    background-color: #45a049;
}

.scenario-info {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
    margin-bottom: 10px;
}

.scenario-name {
    font-weight: bold;
    color: #007bff;
}


.arrow-left-icon {
    width: 18px;
    height: 18px;
    margin-right: 4px;
    background-image: url('../images/arrow-left.svg'); /* Add your arrow icon */
}
.arrow-right-icon {
    width: 18px;
    height: 18px;
    margin-left: 4px;
    color:#ffffff;
    background-image: url('../images/arrow-right.svg'); /* Add your arrow icon */
    filter: brightness(0) invert(1);
}

.arrow-left-icon, .arrow-right-icon {
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.grower-name {
    color: var(--highlight-color);
    font-size: 20px;
    margin-left: 40px;
}

/* Progress steps styling */
.progress-container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Align items to the start */
    width: 100%;
    margin: 20 auto;
}
.step {
    flex: 1;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #E0E0E0; /* Default grey */
    color: #424242;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
    padding: 0; 
    margin: 0; 
}
.step.active {
    background: #52910E; /* Dark green for current step */
    color: white;
}
.step.completed {
    background: #2B6636;; /* Light green for completed steps */
    color: white;
}
.chevron-forward {
    width: auto; /* Adjust size as needed */
    height: 32px; /* Match the height of the steps */
    margin-left: 0px; /* Pull closer to the step */
    margin-right: -3.5px; /* Pull closer to the next step */
}
.chevron-backward {
    width: auto; /* Adjust size as needed */
    height: 32px; /* Match the height of the steps */
    margin-left: -3.5px; /* Pull closer to the step */
    margin-right: 0px; /* Pull closer to the next step */
}

/* Progress indicator styling */
.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 40px 0;
}

.indicator-line {
    width: 479px;
    height: 2px;
    background-color: #D6D6D6;
    position: absolute;
    z-index: 1;
}

.indicator-line-completed {
    width: 232px;
    height: 2px;
    background-color: var(--highlight-light);
    position: absolute;
    left: 0;
    z-index: 2;
}

.indicator-step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid #D6D6D6;
    margin: 0 120px;
    z-index: 3;
    position: relative;
}

.indicator-step.completed {
    border-color: var(--highlight-light);
}

.indicator-step.active {
    border-color: var(--highlight-light);
}

.indicator-label {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    color: #A2A2A2;
    font-size: 12px;
}

.indicator-step.completed .indicator-label,
.indicator-step.active .indicator-label {
    color: var(--highlight-color);
}



/* Filter controls styling */
.filter-controls {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    margin: 20px 0;
    gap: 15px;
}

/* Keep label above the controls */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Make the select and button sit side-by-side */
.group-controls {
  display: flex;
  align-items: center;
  gap: 8px;         /* space between select and button */
  flex-wrap: wrap;  /* allows wrapping on small screens */
}

/* Optional: ensure consistent height with the button */
.filter-select {
  height: 32px;
  padding: 0 8px;
}

/* Make the button inline-level flex so it doesn't break to a new line */
.extra-button {
  display: inline-flex;     /* was display:flex */
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--highlight-color);
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  background-color: white;
  color: var(--highlight-color);
  white-space: nowrap;      /* avoid wrapping the text across lines */
}

/* If a global style sets full width, this prevents vertical stacking */
.group-controls .filter-select,
.group-controls .extra-button {
  width: auto;
  max-width: 100%;
}

.filter-select {
    width: 120px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 0 8px;
    background-color: white;
    font-size: 13px;
}

.view-map-button button {
    height: 32px;
    padding: 0 10px;
    background-color: white;
    color: var(--highlight-color);
    border: 1px solid var(--highlight-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Fields table styling */
.fields-table {
    margin: 20px 0;
    flex: 1;
    overflow: auto; /* Enable scrolling */
    min-height: 0; /* Important for proper flex behavior */
    margin-bottom: 10px; /* Small gap before footer */
}

/* Styling for the checkbox column */
.select-column {
    width: 50px;
    text-align: center;
}

/* Style for inactive (unchecked) rows */
tr.inactive {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
    background-color: #f0f0f0 !important; /* Override alt-row background */
}

tr.inactive td {
    background-color: inherit !important;
}

/* Make the checkboxes themselves clickable even when row is inactive */
tr.inactive td.select-column {
    pointer-events: auto;
}

/* Style the checkboxes */
.field-selector {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.field-selector:checked {
    accent-color: var(--highlight-color); /* Use your green highlight color */
}

tr {
    background-color: var(--row-background);
}

tr.alt-row {
    background-color: var(--alt-row-background);
}

.hidden-column {
    visibility: hidden;
    width: 0 !important; /* Important to override column width selectors */
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden;
}

/* Make sure backgrounds of cells match their parent rows */
tr td {
    background-color: inherit;
}

/* Make the table header sticky */
.fields-table thead {
    position: sticky;
    top: 0;
    background-color: white; /* Or whatever your header background is */
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Optional: adds shadow under header */
}
/* Add to your existing table CSS */
.fields-table table {
    table-layout: fixed; /* This makes the columns respect their widths */
    width: 100%;
}

.fields-table tr.alt-row td {
    background-color: var(--background-light);
}

.fields-table th {
    vertical-align: top; /* Aligns two-line headers to the top */
    padding: 8px 4px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap; /* Prevents header text from wrapping except at <br/> */
    background-color: white; /* Prevents content showing through */
    position: relative;
}

/* Specific column widths */
.fields-table th:nth-child(1) { /* Fields */
    width: 30px;
}

.fields-table th:nth-child(2) { /* Fields */
    width: 180px;
}
.fields-table th:nth-child(3) { /* Area */
    width: 50px;
}
.fields-table th:nth-child(4) { /* Area */
    width: 70px;
}

.fields-table th:nth-child(5) { /* Historic Yield */
    width: 80px;
}

.fields-table th:nth-child(6) { /* Target */
    width: 70px;
}

.fields-table th:nth-child(7) { /* Hybrid */
    width: 120px;
}

.fields-table td .hybrids-button {
    display: block;
    margin: 0 auto;
}

.fields-table th:nth-child(8) { /* Hybrid Wizard */
    width: 200px;
    text-align: center;
}

.fields-table th:nth-child(9) { /* Seeds/ha */
    width: 100px;
}

.fields-table th:nth-child(10) { /* Bags */
    width: 60px;
}

/* Preserve alternating row colors */
.fields-table tr.alt-row td {
    background-color: var(--background-light);
}

/* Keep info icon column visible */
.fields-table th:last-child,
.fields-table td:last-child {
    visibility: visible !important;
    padding: 8px !important;
   
}

/* Optional: Add some styling for number inputs */
.fields-table input[type="text"][data-column="Target (t/ha)"],
.fields-table input[type="text"][data-column="Seeds/ha"] {
    font-family: monospace; /* Makes numbers align better */
}

/* Make sure cells don't wrap unnecessarily */
.fields-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 4px;
}

/* Style for numeric columns */
.fields-table td[data-column="Target (t/ha)"],
.fields-table td[data-column="Seeds/ha"],
.fields-table td[data-column="Bags"] {
    text-align: right;
}

.field-shape-image {
    width: 50px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.field-shape-cell {
    text-align: center;
    padding: 5px;
}

.fields-table input[type="text"][data-column="Seeds/ha"] {
    width: 90px;
    text-align: right;
    padding-right: 5px;
    font-family: monospace;
    font-size: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    height: 48px;
    text-align: left;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    background-color: white;
}

tbody td {
    height: 48px;
    padding: 8px;
    font-size: 16px;
    color: var(--text-dark);
}

tbody tr.alt-row td {
    background-color: var(--background-light);
}

tbody td input[type="text"] {
    width: 100%;
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 0 8px;
    font-size: 13px;
}

tbody td select {
    width: 100%;
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 0 8px;
    font-size: 13px;
}

.hybrids-button {
    height: 32px;
    padding: 0 10px;
    background-color: var(--background-green-light);
    color: var(--highlight-color);
    border: 1px solid var(--highlight-color);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.hybrids-button:hover {
    background-color: #a3c480;
    color:  #050800;
}

.hybrids-button:after {
    content: "";
    width: 18px;
    height: 18px;
    margin-left: 4px;
    background-image: url('../images/arrow-right.svg'); /* Add your arrow icon */
}

.date-picker {
    position: relative;
    display: flex;
    align-items: center;
}

.calendar-icon {
    position: absolute;
    right: 8px;
    width: 18px;
    height: 18px;
    background-image: url('../images/calendar-1.svg'); /* Add your calendar icon */
}

.risk-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.risk-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 12px;
}

.risk-label.low {
    color: var(--low-risk-color);
}

.risk-label.med {
    color: var(--low-risk-color);
}


.risk-label.high {
    color: var(--low-risk-color);
}


.gdu-cell {
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.info-icon {
    display: block;
    width: 20px;
    height: 20px;
    background-image: url('../images/info.svg'); /* Add your info icon */
    cursor: pointer;
   margin-left: auto;
}

/* Additional inputs styling */
.additional-inputs {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.input-group input,
.input-group select {
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 0 8px;
    font-size: 13px;
}

/* Footer styling */
.footer {
    width: 100%;
    height: 79px;
    background-color: white;
    box-shadow: 0px -4px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    padding: 0 20px;
    flex-shrink: 0;
    border-top: 1px solid #e0e0e0; /* Optional: visual separator */
}

/* Optional: Custom scrollbar styling for the table */
.fields-table::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.fields-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.fields-table::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.fields-table::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.footer-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
}
/* Search input styling */
.search-container {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    height: 40px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 0 10px;
    font-size: 14px;
}

/* Farmers table styling */
.farmers-table {
    margin: 20px 0;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    height: 48px;
    text-align: left;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    background-color: white;
}

tbody td {
    height: 48px;
    padding: 8px;
    font-size: 16px;
    color: var(--text-dark);
}

/* Add New Farmer Button */
.add-new-farmer {
    margin-top: 20px;
}

.add-new-button {
    height: 40px;
    padding: 0 20px;
    background-color: var(--highlight-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.summary-and-filters {
    display: flex; /* Use flexbox */
    align-items: center; /* Align items vertically */
    justify-content: space-between; /* Space between items */
}

.fieldsTable tr {
    transition: opacity 0.3s ease;
    opacity: 1;
}

.fieldsTable tr.unselected {
    opacity: 0.5;
}

.fields-summary {
    margin-right: 20px; /* Add space between summary and filters */
    margin-left: 25px;
    font-size: 1.15em;   /* Increase font size */
    font-weight: bold;  /* Optional: make the font bold */
}

.filter-controls {
    display: flex; /* Use flexbox for filter controls */
    flex-wrap: wrap; /* Allow wrapping if needed */
}

.filter-group {
    margin: 0 10px; /* Add space between filter groups */
}

/* Recommendation button styling */
.recommendation-cell {
    position: relative;
}

.recommendation-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #52910E;
    font-size: 16px;
    padding: 2px 6px;
    margin-left: 5px;
}

.recommendation-btn:hover {
    background-color: rgba(82, 145, 14, 0.1);
    border-radius: 4px;
}

/* Hybrid Recommendation Popup Styles */
.hybrid-recommendation-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.hybrid-recommendation-content {
    position: relative;
    background: white;
    margin: 5% auto;
    padding: 0;
    width: 700px;
    max-height: 80vh; /* Limit height to create scrolling */
    border-radius: 4px;
    box-shadow: 0px 4px 28px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.hybrid-recommendation-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #EEEEEE;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.hybrid-recommendation-header h2 {
    color: #424242;
    font-size: 18px;
    font-family: Inter, sans-serif;
    font-weight: 700;
    line-height: 22px;
    margin: 0;
}

.close-hybrid-recommendation {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-hybrid-recommendation:hover,
.close-hybrid-recommendation:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
/* Close Button */
.close-button {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    line-height: 1;
}

.close-button:hover {
    color: var(--text-dark);
}
/* Tabs - These remain sticky at the top when scrolling */
.hybrid-recommendation-tabs {
    display: flex;
    border-bottom: 1px solid #EEEEEE;
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
    flex-shrink: 0; /* Prevent tabs from shrinking */
}

.hybrid-recommendation-tabs .tab {
    padding: 12px 16px;
    font-size: 14px;
    font-family: Inter, sans-serif;
    font-weight: 400;
    color: #666666;
    cursor: pointer;
}

.hybrid-recommendation-tabs .tab.active {
    color: #52910E;
    border-bottom: 2px solid #52910E;
}

/* Scrollable body container */
.hybrid-recommendation-body {
    overflow-y: auto;
    padding: 0;
    flex-grow: 1; /* Allow body to grow and scroll */
}

/* Content sections */
.content-section {
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.content-section h3 {
    color: #424242;
    font-size: 18px;
    font-family: Inter, sans-serif;
    font-weight: 700;
    line-height: 22px;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Hybrid List */
.hybrid-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.hybrid-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 4px;
    border: 1px solid #CCCCCC;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.hybrid-name {
    width: 90px;
    padding: 10px;
    font-size: 13px;
    font-family: Inter, sans-serif;
    font-weight: 700;
    line-height: 15px;
    color: #191919;
    height: 48px;
    display: flex;
    align-items: center;
}

.hybrid-name.dkc4038 {
    border-left: 3px solid #EE8041;
}

.hybrid-name.dkc3560 {
    border-left: 3px solid #0093E2;
}

.hybrid-name.dkc3320 {
    border-left: 3px solid #17AB6D;
}

.hybrid-maturity, .hybrid-density, .hybrid-yield {
    padding: 10px;
    font-size: 13px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    line-height: 15px;
    color: #666666;
    height: 48px;
    display: flex;
    align-items: center;
}

.hybrid-maturity {
    width: 115px;
}

.hybrid-density, .hybrid-yield {
    flex: 1;
}

.hybrid-action {
    padding: 10px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 48px;
    flex: 1;
}

.select-btn {
    background: #52910E;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 14px;
    font-family: Inter, sans-serif;
    font-weight: 700;
    line-height: 16px;
    cursor: pointer;
}

.select-btn:hover {
    background: #3F7004;
}

.add-hybrid-btn {
    display: inline-flex;
    align-items: center;
    background: white;
    border: 1px solid #52910E;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
    font-family: Inter, sans-serif;
    color: #52910E;
    cursor: pointer;
    margin-top: 10px;
}

.add-hybrid-btn:hover {
    background: rgba(82, 145, 14, 0.05);
}

/* Density Chart */
.density-chart-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin-top: 20px;
}

.y-axis-label {
    position: absolute;
    left: 10px;
    top: 0;
    color: #666666;
    font-size: 11px;
    font-family: "Bayer Sans", sans-serif;
    font-weight: 500;
}

.x-axis-label {
    position: absolute;
    right: 10px;
    bottom: 30px;
    color: #666666;
    font-size: 11px;
    font-family: "Bayer Sans", sans-serif;
    font-weight: 500;
}

.hybrid-legend {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.legend-label {
    color: #191919;
    font-size: 14px;
    font-family: "Bayer Sans", sans-serif;
    font-weight: 700;
}

/* Fenology */
.fenology-chart-container {
    margin-top: 20px;
}

.growth-timeline {
    position: relative;
    margin-bottom: 20px;
}

.timeline-track {
    height: 8px;
    background: #BEC6D1;
    border-radius: 29px;
    position: relative;
    margin: 15px 0;
}

.planting-stage {
    position: absolute;
    height: 100%;
    left: 0;
    width: 15%;
    background: #ABC544;
    border-radius: 29px;
}

.emergence-stage {
    position: absolute;
    height: 100%;
    left: 15%;
    width: 25%;
    background: #3DAF2C;
    border-radius: 29px;
}

.flowering-stage {
    position: absolute;
    height: 100%;
    left: 40%;
    width: 30%;
    background: #1A5411;
    border-radius: 29px;
}

.timeline-markers {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 10px;
}

.timeline-markers .marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
}

.marker.planting {
    left: 15%;
    transform: translateX(-50%);
}

.marker.emergence {
    left: 35%;
    transform: translateX(-50%);
}

.marker.flowering {
    left: 65%;
    transform: translateX(-50%);
}

.marker.maturity {
    left: 95%;
    transform: translateX(-50%);
}

.marker .label {
    color: #818181;
    font-size: 9px;
    font-family: "Bayer Sans", sans-serif;
    font-weight: 500;
    text-align: center;
}

.fenology-data {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 100px 1fr;
    row-gap: 15px;
}

.hybrid-row {
    display: contents;
}

.hybrid-name-cell {
    color: #191919;
    font-size: 13px;
    font-family: Inter, sans-serif;
    font-weight: 600;
    line-height: 14px;
    padding: 10px 0;
}

.gdu-values {
    display: flex;
    justify-content: space-between;
}

.gdu-tag {
    background: white;
    border-radius: 26px;
    padding: 4px 10px;
    color: #666666;
    font-size: 10px;
    font-family: "Bayer Sans", sans-serif;
    font-weight: 500;
    text-transform: uppercase;
}

.gdu-tag.flowering-zone {
    background: #FFF2ED;
}

/* Features */
.features-table {
    width: 100%;
    border-collapse: collapse;
}

.features-table th {
    color: #191919;
    font-size: 12px;
    font-family: "Bayer Sans", sans-serif;
    font-weight: 700;
    text-align: center;
    padding: 10px;
}

.features-table .feature-name {
    color: #191919;
    font-size: 13px;
    font-family: Inter, sans-serif;
    font-weight: 600;
    padding: 10px 0;
}

.feature-row {
    border-bottom: 1px solid #CCCCCC;
}

.feature-rating {
    text-align: center;
    padding: 10px;
}

.rating-excellent {
    background: #E8F6D9;
    color: #108242;
    font-size: 10px;
    font-family: "Bayer Sans", sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    border-radius: 26px;
    padding: 4px 10px;
    display: inline-block;
}

/* For the recommendation button in the table */
.hybrids-button {
    background-color: #52910E;
    border: 1px solid #52910E;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-family: Inter, sans-serif;
    padding: 6px 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 100px;
    text-align: left;
}

.hybrids-button:hover {
    background-color: #a9b69b;
    color: #050800;
}

/* Add arrow icon */
.hybrids-button::after {
    content: ">";
    margin-left: 6px;
    font-weight: bold;
}

/* Add scroll padding for smooth scrolling to sections */
html {
    scroll-padding-top: 120px; /* Adjust based on your header + tabs height */
    scroll-behavior: smooth;
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Add these flex properties for centering */
    justify-content: center;
    align-items: center;
}
/* When the modal is shown, use flex display */
.modal[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 500px;
    border-radius: 4px;
    box-shadow: 0px 4px 28px rgba(0, 0, 0, 0.25);
    padding: 24px;
    position: relative;
    /* Remove any margin that might affect centering */
    margin: 0;
}

/* Modal Header */
.modal-content h2 {
    color: var(--text-dark);
    font-size: 18px;
    font-family: Inter, sans-serif;
    font-weight: 700;
    line-height: 22px;
    margin: 0 0 16px 0;
}

.modal h3 {
    color: #424242;
    margin-bottom: 15px;
    font-size: 18px;
}
/* Modal Message */
#densityUpdateMessage {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* Field Name Display */
#fieldNameSpan {
    color: var(--highlight-color);
    font-weight: 600;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}


/* Primary Button (Update) */
#updateDensityBtn {
    background-color: var(--highlight-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

#updateDensityBtn:hover {
    background-color: var(--highlight-light);
}

/* Secondary Button (Keep) */
#keepDensityBtn {
    background-color: white;
    color: var(--highlight-color);
    border: 1px solid var(--highlight-color);
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

#keepDensityBtn:hover {
    background-color: var(--background-green-light);
}




.btn-primary {
    background-color: #52910E;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary {
    background-color: white;
    color: #52910E;
    border: 1px solid #52910E;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #3F7004;
}

.btn-secondary:hover {
    background-color: #f5f5f5;
}



/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #10384F; /* Bayer blue color - adjust to match your theme */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Spinning animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Optional: Fancy spinner with multiple rings */
.spinner-fancy {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner-fancy::before,
.spinner-fancy::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.spinner-fancy::before {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(16, 56, 79, 0.1);
}

.spinner-fancy::after {
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #10384F;
    animation: spin 0.7s linear infinite;
}

/* Scenario management styles */
.scenario-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.save-scenario-btn {
    background-color: #4CAF50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.save-scenario-btn:hover {
    background-color: #45a049;
}

.save-scenario-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.scenario-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    margin-bottom: 20px;
}

.scenario-name {
    font-weight: bold;
    color: #007bff;
    font-size: 16px;
}

.scenario-status {
    font-size: 12px;
    margin-left: 10px;
}

.status-saved {
    color: #28a745;
}

.status-unsaved {
    color: #ff6b35;
}

.status-autosaved {
    color: #28a745;
}
