.calculadora-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    .calculadora-colla {
        display: flex;
        align-items: stretch;
        gap: 0.5rem;

        &:not(:last-of-type) {
            border-bottom: 2px solid var(--color-gray-light);
            padding-bottom: 0.5rem;
        }

        @media (width >= 52rem) {
            &:not(:last-of-type) {
                border-bottom: none;
                padding-bottom: 0;
            }
        }

        .castells-wrapper {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            flex: 2;

            @media (width >= 52rem) {
                flex-direction: row;
                flex: 1;
            }

            .calculadora-castell {
                display: grid;
                grid-template-columns: 1fr;

                @media (width >= 52rem) {
                    flex: 1;
                    min-width: 0;
                }

                /* ONLY applies if there are exactly 2 Select2 containers */
                &:has(> .select2.select2-container:nth-of-type(2)) {
                    grid-template-columns: 1fr 60px;

                    .select2.select2-container:nth-of-type(1) .select2-selection {
                        border-top-right-radius: 0 !important;
                        border-bottom-right-radius: 0 !important;
                    }

                    .select2.select2-container:nth-of-type(2) .select2-selection {
                        border-top-left-radius: 0 !important;
                        border-bottom-left-radius: 0 !important;
                    }
                }
            }
        }

        .points-container {
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: var(--color-secondary);
            border-radius: 0.5rem;
            min-width: 90px;
            flex: 1;

            @media (width >= 52rem) {
                flex: 0 0 auto;
            }

            span {
                color: white;
                font-weight: bold;
            }
        }
    }
}
