.config,
.results {
    border: 1px solid #a3a3a3;
    width:100%;
}

.config .top,
.results .top {
    padding: 2rem;
}

.config-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.config-table th:nth-child(1),
.config-table td:nth-child(1) {
    width: 30%;
    text-align: right;
    background-color: #cfcfcf3d;
    border-right: #a3a3a3 1px solid;
}

.config-table th:nth-child(2),
.config-table td:nth-child(2) {
    /* width: 100%; */
    display: flex;
    flex-flow: row;
    flex-wrap: wrap;
    align-items: stretch;
    padding-left: 2rem;
    gap: 1rem;
}

tbody tr:first-child td {
    padding-top: 2rem;
}

tbody tr:last-child td {
    padding-bottom: 2rem;
}


.config-table th,
.config-table td {
    padding: 1rem;
    text-align: left;
    vertical-align: middle;
}

.radio-architecture-group {
    display: flex;
    gap: 1rem;
    min-width: 0;
}

.arch-radio-label {
    flex: 1;
    width: 100%;
    cursor: pointer;
    min-width: 0;
}

.arch-radio-label input[type="radio"],
.arch-radio-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.arch-radio-label input[type="number"] {
    font-weight: bold;
    font-family: system-ui, -apple-system, sans-serif;
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.arch-radio-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    user-select: none;
}

.arch-circle {
    width: 16px;
    height: 16px;
    aspect-ratio: 1 / 1;
    border: 2px solid #a7a7a7;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease-in-out;
}

.arch-text {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #a7a7a7;
    transition: color 0.2s ease-in-out;
}

.arch-radio-label:hover .arch-radio-button {
    border-color: #a3a3a3;
    background-color: #f8fafc;
}

.arch-radio-label input[type="radio"]:checked + .arch-radio-button,
.arch-radio-label input[type="checkbox"]:checked + .arch-radio-button{
    border-color: #a3a3a3;
    background-color: #e4e4e47a;
}

.arch-radio-label input[type="radio"]:checked + .arch-radio-button .arch-text,
.arch-radio-label input[type="checkbox"]:checked + .arch-radio-button .arch-text {
    color: #6b6b6b;
}

.arch-radio-label input[type="radio"]:checked + .arch-radio-button .arch-circle,
.arch-radio-label input[type="checkbox"]:checked + .arch-radio-button .arch-circle {
    border-color: #a3a3a3;
    background-color: #a3a3a3;
}

.arch-radio-label input[type="radio"]:checked + .arch-radio-button .arch-circle::after,
.arch-radio-label input[type="checkbox"]:checked + .arch-radio-button .arch-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
}

.arch-radio-label input[type="radio"]:focus-visible + .arch-radio-button,
.arch-radio-label input[type="checkbox"]:focus-visible + .arch-radio-button {
    outline: 2px solid #a3a3a3;
    outline-offset: 2px;
}

.arch-radio-button.input::-webkit-inner-spin-button,
.arch-radio-button.input::-webkit-outer-spin-button {
  opacity: 1;
  appearance: auto;
  margin: 0; 
  height: 24px;
}

.arch-radio-button.input {
  appearance: number-input;
  width: 100%;
  box-sizing: border-box;
}

.panel-layout-row td {
    /* width: 50%; */
    vertical-align: top;
    padding: 1rem;
}

.slider-container {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
    max-width: 450px;
}

.split-columns-container {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.slider-layout {
    /* flex: 1; */
    gap: 0.5rem;
    display: flex;
    width: 450px;
    flex-direction: column;
}

.ruler-ticks {
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
    font-size: 12px;
    color: #666;
    font-family: monospace;
    border-bottom: 2px solid #ccc;
    margin-bottom: 4px;
}

.panel-slider {
    width: 100%;
    margin: 0;
    cursor: pointer;
}

.extrusion-type-row > td {
    padding-top: 8px;
}

.extrusion-type-row .extrusion-type-options {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: 1rem;
    align-items: start;
}

.extrusion-type-row .extrusion-type-option {
    margin: 0;
}

.extrusion-type-row .arch-radio-button {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.extrusion-type-row .extrusion-option-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.extrusion-type-row .extrusion-option-image {
    display: block;
    max-height: 60px;
    height: auto;
    object-fit: contain;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;       
    margin-top: 15px;
    min-height: 100px;
}

#leftImages {
    justify-content: flex-end;
}

#rightImages {
    justify-content: flex-start;
}

.image-preview-container img {
    width: fit-content;    
    height: 75px;   
    object-fit: contain;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.result-display {
    width: 100%;
    font-family: sans-serif;
}

.parts-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.parts-table th,
.parts-table td {
    padding: 2rem;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.parts-table th {
    background-color: #f8f9fa;
    color: #333333;
    font-weight: 600;
}

.parts-table th:nth-child(1), .parts-table td:nth-child(1),
.parts-table th:nth-child(2), .parts-table td:nth-child(2) {
    text-align: left;
}

.parts-table th:nth-child(3), .parts-table td:nth-child(3),
.parts-table th:nth-child(4), .parts-table td:nth-child(4),
.parts-table th:nth-child(5), .parts-table td:nth-child(5) {
    text-align: center; 
}

.parts-table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

.parts-table tbody tr:hover {
    background-color: #f1f3f5;
}

.parts-table td:nth-child(5) {
    font-weight: bold;
    color: #111111;
}

h3.calc.mobile {
    display: none;
}

@media screen and (max-width:1000px) {
    h3.calc.mobile {
        display: flex;
    }
    .raio-architecture-group {
        width: max-content;
    }
    .config-table td:nth-child(2),
    .split-columns-container {
        flex-direction: column;
    }
    .slider-layout {
        width: 100%;
    }
    .slider-container {
        max-width: none;
    }
    .image-preview-container {
        min-height: 50px;
        margin-bottom:  2rem;
    }
    .image-preview-container img{
        width: 100%;
        height: 150px;
    }
    .parts-table th,
    .parts-table td {
        padding: 1rem;
    }
    .config .top, 
    .results .top {
        padding: 1.5rem 1rem;
    }
    section.info .square {
        aspect-ratio: 1 / 1;
    }
    .panel-slider {
        width: 100%;
        height: 44px;
        appearance: none;
        -webkit-appearance: none;
        background: transparent;
        cursor: pointer;
        touch-action: pan-y;
    }
    .panel-slider::-webkit-slider-runnable-track {
        height: 12px;
        border-radius: 999px;
        background: #c9c8c7;
    }
    .panel-slider::-webkit-slider-thumb {
        appearance: none;
        -webkit-appearance: none;
        width: 30px;
        height: 30px;
        margin-top: -9px; 
        border-radius: 50%;
        background: #181818;
        border: 3px solid #f2f0ef;
        cursor: pointer;
    }

    .panel-slider::-moz-range-track {
        height: 12px;
        border-radius: 999px;
        background: #c9c8c7;
    }

    .panel-slider::-moz-range-thumb {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: #181818;
        border: 3px solid #f2f0ef;
        cursor: pointer;
    }
    .panel-layout-row td,
    .config-table td:nth-child(2) {
        padding: 1.5rem 1rem;
        padding-left: 1rem;
    }
    .calculator tr td:first-child {
        display: none;
    }
}

@media screen and (max-width:900px) {
    .results .top.row {
        flex-direction: column;
    }
    .results .top h1 {
        align-self: flex-start;
    }
}
