/* =========================================
   1. BASE / TYPOGRAPHY
   ========================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px;
    box-sizing: border-box;
}

h2 {
    margin-top: 0;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

hr {
    border: 0;
    height: 1px;
    background: #333;
    margin: 1.5rem 0;
}

/* =========================================
   2. LAYOUT
   ========================================= */
.container {
    background: #1e1e1e;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 1200px;
    border: 1px solid #333;
}

.layout-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.columns-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start; 
}

.config-column {
    flex: 1; 
    display: flex;
    flex-direction: column;
    gap: 15px; 
}


.selection-panel {
    flex: 0 0 350px;
    min-width: 300px;
    padding-right: 20px;
    border-right: 1px solid #333;
        
}

.results-panel {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

/* =========================================
   3. FORMS & INPUTS
   ========================================= */
.form-group {
    margin-bottom: 1.2rem;
    position: relative; 
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #c0c0c0;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    background: #2d2d2d;
    color: #fff;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

input[type="text"]:focus {
    background: #363636;
    border-color: #007bff;
    outline: none;
}

input:disabled {
    background-color: #333;
    color: #777;
    border-color: #444;
    cursor: not-allowed;
}

.tiny-input {
    width: 60px;
    margin-left: 15px;
    padding: 6px;
    border: 1px solid #444;
    background: #2d2d2d;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-item input {
    margin-right: 12px;
    transform: scale(1.1);
    accent-color: #007bff;
}

.checkbox-item label {
    font-weight: normal;
    margin: 0;
    cursor: pointer;
    color: #a0a0a0;
}

/* =========================================
   4. CUSTOM DROPDOWN
   ========================================= */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-options {
    position: absolute;
    top: 105%; 
    left: 0;
    right: 0;
    background: #252526;
    border: 1px solid #444;
    border-radius: 6px;
    max-height: 250px; 
    overflow-y: auto;
    z-index: 1000;
    display: none; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.dropdown-options.show {
    display: block;
}

.dropdown-option {
    padding: 10px 12px;
    cursor: pointer;
    color: #e0e0e0;
    border-bottom: 1px solid #333;
    transition: background 0.1s;
}

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

.dropdown-option:hover {
    background-color: #007bff;
    color: white;
}

/* =========================================
   5. BUTTONS
   ========================================= */
.btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 25px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

/* =========================================
   6. RESULTS & CARDS
   ========================================= */
.result-container {
    border-radius: 8px;
    height: 100%;
    max-height: 85vh;       
    overflow-y: auto;       
    padding-right: 10px;   
    overflow-x: hidden; 
}

.result-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #ffffff;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    font-size: 1.2rem;
}

.comparison-grid {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

/* Zusammengeführte set-wrapper Eigenschaften */
.set-wrapper {
    flex: 1;
    background: #252526;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    /** overflow: hidden; **/ 
    transition: transform 0.2s, border-color 0.2s;
}

.set-wrapper:hover {
    border-color: #007bff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.set-wrapper:last-child {
    border-top: 4px solid #007bff;
}

.set-header {
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-bottom: 1px solid #3a3a3a;
    padding-bottom: 8px;
}

.set-summary {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2d2d2d;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}

.set-details {
    display: none; 
    padding: 15px;
    background: #1e1e1e;
}

.set-wrapper.is-expanded .set-details {
    display: block;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
}

.result-section {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.result-section strong {
    display: block;
    color: #fff;
    margin-bottom: 4px;
    font-weight: 700;
}

.result-line {
    margin-left: 0;
    padding-left: 10px;
    border-left: 2px solid #444;
    line-height: 1.5;
    color: #ccc;
}

.result-line b {
    color: #fff;
}

.result-line a {
    color: #4da3ff;
    text-decoration: none;
    font-weight: 500;
}

.result-line a:hover {
    text-decoration: underline;
}

/* =========================================
   7. UTILITIES & STATES
   ========================================= */
.hidden {
    display: none !important;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    text-align: center;
    border: 2px dashed #444;
    border-radius: 12px;
    padding: 40px;
    min-height: 200px;
}

/* --- Dark Mode Scrollbar Styling (Optional aber empfehlenswert) --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e1e1e; 
}
::-webkit-scrollbar-thumb {
    background: #444; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555; 
}

/* =========================================
   8. MEDIA QUERIES
   ========================================= */
@media (max-width: 900px) {
    .columns-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 800px) {
    .selection-panel {
        flex: 100%;
        border-right: none;
        border-bottom: 1px solid #333;
        padding-bottom: 30px;
        margin-bottom: 30px;
        max-height: none; /* Hebt Scrollen auf Mobile auf für besseren Flow */
    }
}


/******* Starting here, the css is done by me and or taken from older projects of mine ******/
/*******  TOOLTIPS ******/
.tooltip-container {
    position: relative;
    display: inline-flex;
    cursor: help;
}

.help-icon {
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
    margin-left: 6px;
}

.tooltip-box {
    visibility: hidden;
    opacity: 0;
    width: 300px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1500;
    bottom: 125%; 
    left: 50%;
    transform: translateX(-50%); 
    transition: opacity 0.3s, visibility 0.3s;
}

.tooltip-box::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.tooltip-container:hover .tooltip-box,
.tooltip-container .tooltip-box:hover {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.tooltip-box a {
    color: #00bbff;
    text-decoration: underline;
    display: block;
    margin-top: 5px;
}

/***** delete *****/
.delete-btn {
    color: #ff4d4d;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.1s, color 0.1s;
    display: inline-block;
}

.delete-btn:hover {
    color: #ff1a1a;
    transform: scale(1.3);
}