#sugar-planner {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 75vh;
    position: relative;
    border: none;
    overflow: hidden;
}

.iframe-container {
    position: relative;
}

#product-display tfoot td {
  font-weight: bold;
  background-color: #f9f9f9;
}

#toggle-overlay {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 99;
}

.overlay-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

.overlay-pane.active {
    display: flex;
}

.overlay-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.overlay-body {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    overflow: auto;
}

.table-footer {
    display: flex;
    justify-content: end;
    padding: 10px 0;
    border-top: 1px solid #ddd;
}

.product-section,
.buyer-section {
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.buyer-section {
    flex: 0.4;
    overflow: auto;
}

.product-section {
    flex: 0.6;
}

#product-section-bottom {
    display: flex;
    flex-direction: row;
}

.section-divider {
    border-right: 1px solid #ddd;
    height: 100%;
    width: 1px;
}

.overlay-content h2 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

/* Styling for overlay buttons */
.overlay-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 15px;
}

.overlay-buttons button {
    flex: 1;
    padding: 10px;
    font-size: 16px;
}

#product-buying-options {
    display: flex;
    flex-direction: column;
    width: fit-content;
    gap: 10px;
    margin-top: 10px;
}

#product-buying-options .section-label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}

#product-buying-options .radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background 0.3s, border-color 0.3s;
}

#product-buying-options .radio-label:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

#product-buying-options input[type="radio"] {
    accent-color: #0073aa;
}

#product-buying-options input[type="radio"]:disabled {
    accent-color: #ccc;
}

#product-buying-options .radio-label:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

#product-display table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    margin-top: 10px;
}

#product-display th,
#product-display td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

#product-display thead {
    background-color: #f0f0f0;
}

#product-display tbody tr:nth-child(even) {
    background-color: #fafafa;
}

#product-display tbody tr:hover {
    background-color: #f5f5f5;
}

/* Enhanced Button Styles */
button,
.overlay-button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

button:hover,
.overlay-button:hover,
#toggle-overlay:hover {
    background-color: #005f8d;
}

button:active,
.overlay-button:active,
#toggle-overlay:active {
    background-color: #004f7a;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.2);
}

button:focus,
.overlay-button:focus,
#toggle-overlay:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.5);
}

.warning-message {
    margin-top: 10px;
    padding: 10px;
    background-color: #ffe5e5;
    border: 1px solid #ff0000;
    color: #ff0000;
    border-radius: 4px;
    font-size: 14px;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

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

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0069d9;
}

#overlay-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%;
    align-items: center;
    justify-content: center;
}

#overlay-buttons-container button {
        width: fit-content;
}

.buyer-info-row.grouped {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.buyer-info-row.grouped .buyer-half {
	flex: 1;
	min-width: 45%;
	display: flex;
	flex-direction: column;
}

/* Buyer input field visual improvements */
.buyer-info-row input[disabled],
.buyer-info-row input:disabled,
.input-disabled {
    background-color: #f0f0f0;
    color: #555;
    cursor: not-allowed;
    border: 1px solid #ccc;
    font-style: italic;
    opacity: 0.8;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
}
#buyer-info label {
	display: flex;
}
/* Optional: smoother transition */
.buyer-info-row input {
    transition: background-color 0.3s ease, color 0.3s ease, border 0.3s ease-in-out;
}
.buyer-info-row input::placeholder {
    color: lightgrey;
}