/* Modern styling for the explorer interface */
.options_panel {
    padding: 15px;
    background-color: var(--panel-bg);
    max-width: 30rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    margin: 15px;
    backdrop-filter: blur(10px);
    border: none;
    max-height: calc(100vh - 30px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--bg-secondary);
}

.options_panel::-webkit-scrollbar {
    width: 8px;
}

.options_panel::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

.options_panel::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
}

.options_menu {
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    background-color: var(--bg-secondary);
    transition: all 0.3s ease;
}

.options_menu:hover {
    box-shadow: 0 4px 8px var(--shadow);
}

.options_menu h3 {
    color: var(--accent-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.options_list {
    padding: 5px 0;
}

.checkbox-group-buttons {
    display: none;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

/* When checkbox-group-buttons is shown, display as grid */
.checkbox-group-buttons[style*="display: block"] {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

/* Fix for the plus button layout */
.radio-group-buttons br {
    display: none;
}

.plus-details-button {
    padding: 0;
    border-radius: 20px;
    background-color: var(--figma-primary-blue);
    color: white;
    border: none;
    font-size: 16px;
    width: calc(33.33% - 6px);
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0;
}

.plus-details-button:hover {
    background-color: var(--figma-accent-blue);
}

/* Radio and checkbox styling */
input[type="radio"] {
    accent-color: var(--accent-color);
    margin-right: 8px;
}

label {
    color: var(--text-primary);
    display: inline-block;
    margin-bottom: 8px;
    cursor: pointer;
}

/* Radio button group styling */
.radio-group-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
    width: 100%;
}

.radio-group-buttons input[type="radio"] {
    display: none;
}

.radio-group-buttons label {
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    width: calc(33.33% - 6px);
    box-sizing: border-box;
    color: white;
}

.checkbox-group-buttons label {
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    width: 100%;
    color: white;
}

.radio-group-buttons input[type="radio"]:checked + label {
    background-color: var(--figma-primary-blue);
    color: white;
}

.radio-group-buttons label:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Modern styling for fieldsets */
.uk-fieldset {
    border: none;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 15px;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.uk-fieldset:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Slider container styling */
.slider-container {
    padding: 10px 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Range slider styling */
.height-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 15px;
}

.height-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--figma-primary-blue);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.height-slider::-webkit-slider-thumb:hover {
    background: var(--figma-accent-blue);
}

.height-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--figma-primary-blue);
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

.height-slider::-moz-range-thumb:hover {
    background: var(--figma-accent-blue);
}

/* Text input styling */
.text-input-container {
    display: flex;
    justify-content: center;
}

.height-text-input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    text-align: center;
    transition: border-color 0.3s ease;
}

.height-text-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Maritime Transport Hierarchical Toggles */
.maritime-transport-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 450px;
    width: 100%;
}

.transport-main-toggle {
    margin-bottom: 10px;
}

.transport-main-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.transport-main-label:hover {
    color: var(--accent-color);
}

.transport-main-checkbox {
    width: 25px;
    height: 25px;
    margin: 0;
}

.transport-main-text {
    flex: 1;
}

.transport-arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
    color: var(--accent-color);
}

.transport-arrow.expanded {
    transform: rotate(180deg);
}

.transport-subsection {
    margin-left: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subsection-header {
    margin-bottom: 8px;
}

.subsection-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.subsection-toggle:hover {
    color: var(--accent-color);
}

/* Button-based toggle styling for Tipo de Embarcación and Calado */
.subsection-toggle-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
    font-size: 15px;
    color: var(--figma-menu-text);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.subsection-toggle-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.subsection-toggle-button:active {
    transform: scale(0.98);
}

.subsection-checkbox {
    width: 25px;
    height: 25px;
    margin: 0;
}

.subsection-title {
    flex: 1;
    text-align: left;
}

.subsection-arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
    color: var(--figma-menu-text);
    opacity: 0.8;
}

.subsection-arrow.expanded {
    transform: rotate(180deg);
}

.subsection-options {
    margin-left: 0;
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.subsection-options.expanded {
    max-height: 600px;
    opacity: 1;
    padding: 10px 0;
}

.option-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--figma-menu-text);
    transition: all 0.2s ease;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    white-space: nowrap;
}

.option-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.option-toggle input[type="radio"] {
    accent-color: var(--figma-accent-orange);
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.option-toggle span {
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 400;
}

.option-checkbox {
    width: 25px;
    height: 25px;
    margin: 0;
}

/* Months Grid Layout */
.months-grid {
    display: flex;
    gap: 8px;
    margin-left: 0;
    margin-top: 10px;
    flex-wrap: wrap;
    max-width: 100%;
}

.month-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.month-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: color 0.3s ease;
    padding: 2px 0;
    min-width: fit-content;
}

.month-toggle:hover {
    color: var(--accent-color);
}

.month-checkbox {
    width: 25px;
    height: 25px;
    margin: 0;
}

/* Vessel Main Toggle */
.vessel-main-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    color: var(--text-primary);
    transition: color 0.3s ease;
    padding: 5px 0;
}

.vessel-main-toggle:hover {
    color: var(--accent-color);
}

.vessel-main-checkbox {
    width: 25px;
    height: 25px;
    margin: 0;
}

.vessel-main-text {
    flex: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .maritime-transport-container {
        max-width: 350px;
    }
    
    .months-grid {
        flex-direction: column;
        gap: 6px;
    }
    
    .month-column {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .transport-subsection {
        margin-left: 20px;
    }
    
    .subsection-options {
        margin-left: 25px;
        flex-direction: column;
    }
    
    .option-toggle {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .maritime-transport-container {
        max-width: 300px;
    }
    
    .subsection-options {
        margin-left: 15px;
    }
    
    .transport-subsection {
        margin-left: 15px;
    }
}