body {
    font-family: 'Roboto', 'Arial', sans-serif;
    /* padding: 20px; */
    background-color: #f8f9fa;
    color: #333;
}

.navbar {
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: inherit;
    align-items: center;
    justify-content: space-between;
}

.container-fluid {
    padding: 0 30px;
}

.container {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
}

/* FD Table Styling */
.fd-table {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    padding: 5px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fd-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
    margin-top: 5px;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center; 
    width: 100%; 
    display: block;
}

.table {
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    max-width: 300px !important;
    width: 300px !important;
}

.table th {
    background-color: #f0f4f8;
    text-align: center;
    padding: 12px;
    font-weight: 600;
    color: #2c3e50;
}

.table td {
    text-align: center;
    vertical-align: middle;
    padding: 10px;
}

.checkbox-cell {
    text-align: center;
}

.form-check-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* MMAP Function Styling */
.mmap-function {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px;
    margin-bottom: 30px;
    width: 100%;
}

.function-box {
    display: flex;
    align-items: center;
    flex-wrap: nowrap; 
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #34B3DB;
    overflow-x: visible; 
    white-space: nowrap;
}

.param-box {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 6px; 
    margin: 0 3px; 
    min-width: 60px;
    min-height: 35px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* Add styling for the input fields inside param-box */
.param-box input {
    border: none;
    background: transparent;
    text-align: center;
    outline: none;
    width: 100%;
}

.dropdown-box {
    position: relative;
    display: inline-block;
    margin: 0 3px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 10;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.dropdown-content div {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f1f1f1;
}

.dropdown-content div:last-child {
    border-bottom: none;
}

.dropdown-content div:hover {
    background-color: #f1f8ff;
}

.show {
    display: block;
}

/* Buttons */
.map-button {
    display: inline-block;
    padding: 8px 18px;
    background-color: #34A5DB;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    font-weight: bold;
    transition: background-color 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.map-button:hover {
    background-color: #2980b9;
}

.unmap-section {
    margin-top: 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #e74c3c;
    white-space: nowrap;
}

.unmap-section .map-button {
    background-color: #e74c3c;
}

.unmap-section .map-button:hover {
    background-color: #c0392b;
}

/* VMA Info Styling - enhanced for multiple VMAs */
.vma-info {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px;
    margin-top: 20px;
    float: right;
    width: 100%;
    max-width: 450px; 
    max-height: 415px;
    overflow-y: auto;
}

.vma-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 12px;
    color: #2c3e50;
    border-bottom: 2px solid #34B3DB;
    padding-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vma-info div:not(.vma-title) {
    padding: 5px 0;
    font-family: 'Courier New', monospace;
}

/* Canvas Container */
#canvas-container {
    width: 100%;
    margin-top: 25px;
    background-color: #fff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Input styling */
#offsetInput {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    outline: none;
    min-width: 60px;
}

/* Remove number input spinners */
/* Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

/* Layout structure */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    margin-top: 35px;
}

.left-column {
    flex: 1;
    min-width: 0; /* Allow shrinking below min-content width */
    flex-basis: 0;
}

.right-column {
    width: 350px;
    flex-shrink: 0;
}

.clear {
    clear: both;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .function-box {
        flex-wrap: wrap; 
    }
}

@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .right-column {
        width: 100%;
        order: -1; /* Move to top on mobile */
    }
    
    .fd-table, .vma-info {
        max-width: 100%;
        width: 100%;
    }
}

/* Tooltip styling */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-icon {
    cursor: help;
    color: #0077cc;
    font-size: 17px !important;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    z-index: 10 !important;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: 4px;
    width: max-content;
    max-width: 250px; /* Default max-width */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 1;
    transition: opacity 0.3s, transform 0.3s;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    pointer-events: none; /* Ensure tooltips don't block mouse events */
    word-wrap: break-word; /* Allow word wrapping */
    overflow-wrap: break-word;
    line-height: 1.4;
    white-space: pre-line; /* This allows line breaks */
}

/* Default position: top */
.tooltip-top {
    bottom: 75%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px) !important;
}

/* Bottom position */
.tooltip-bottom {
    top: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
}

/* Left position */
.tooltip-left {
    right: 125%;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
}

/* Right position */
.tooltip-right {
    left: 125%;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
}

/* Alignment options */
.tooltip-align-left {
    text-align: left;
}

.tooltip-align-center {
    text-align: center;
}

.tooltip-align-right {
    text-align: right;
}

/* Show tooltip on hover */
.tooltip-icon:hover + .tooltip-text,
.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0); 
    z-index: 100 !important; /* Ensure tooltip is above other elements */
}

/* Specific transforms for other positions when visible */
.tooltip-icon:hover + .tooltip-right,
.tooltip-container:hover .tooltip-right {
    transform: translateY(-50%) translateX(0);
}

.tooltip-icon:hover + .tooltip-left,
.tooltip-container:hover .tooltip-left {
    transform: translateY(-50%) translateX(0);
}

.tooltip-icon:hover + .tooltip-bottom,
.tooltip-container:hover .tooltip-bottom {
    transform: translateX(-50%) translateY(0);
}

/* Arrow for tooltip - position specific */
.tooltip-top::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip-bottom::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

.tooltip-left::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent #333;
}

.tooltip-right::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent #333 transparent transparent;
}

/* Error notification styling */
.error-notification {
    position: fixed;
    top: 20px;
    right: 40%;
    background: #ff5f6d;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    min-width: 300px;
    max-width: 450px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
        
.error-icon {
    font-size: 24px;
    margin-right: 15px;
}
        
.error-message {
    flex-grow: 1;
    font-size: 14px;
    white-space: pre-line;
}
        
.error-close {
    font-size: 24px;
    cursor: pointer;
    margin-left: 15px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
        
.error-close:hover {
    opacity: 1;
}

/* Ensure all interactive elements have pointer cursor */
a, button, select, input[type="checkbox"], input[type="radio"], 
input[type="submit"], input[type="button"], .map-button,
.dropdown-content div, .dropdown-box, 
.error-close, .interactive, .clickable, [role="button"] {
    cursor: pointer;
}

/* Language selector styles */
#languageDropdown {
    cursor: pointer;
    color: #333;
    font-weight: 500;
  }
  
  .dropdown-menu-end {
    right: 0;
    left: auto;
  }
  
  /* Hover effect for language options */
  .dropdown-item:hover {
    background-color: #f0f0f0;
  }