.discourse-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.position-card {
    background: var(--bs-dark);
    border: 2px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.position-label {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--bs-info);
}

.position-holder {
    width: 100%;
    min-height: 80px;
    border: 2px dashed var(--bs-border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    margin-bottom: 0.5rem;
}

.position-holder.drag-over {
    background-color: rgba(var(--bs-info-rgb), 0.1);
    border-style: solid;
}

.explanation-text {
    background-color: var(--bs-dark);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    max-height: 150px;
}

.explanation-text:focus {
    background-color: var(--bs-dark);
    border-color: var(--bs-info);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-info-rgb), 0.25);
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    background-color: var(--bs-dark);
    border: 2px solid var(--bs-border-color);
    border-radius: 8px;
}

.draggable-card {
    width: 66px;
    height: 66px;
    background-color: var(--bs-secondary);
    color: var(--bs-light);
    border: 2px solid var(--bs-border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: move;
    user-select: none;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 1;
}

/* Prevent text selection within the draggable cards */
.draggable-card span {
    user-select: none;
    -webkit-user-select: none; /* Safari/Chrome */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+ */
    /* We might also want -webkit-touch-callout: none; here if iOS callouts on text are an issue */
    /* -webkit-touch-callout: none; */ 
}

.draggable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.draggable-card.dragging {
    opacity: 0.5;
}

@media (max-width: 576px) {
    .discourse-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .position-card {
        padding: 0.5rem;
    }

    .position-label {
        font-size: 1rem;
    }

    .position-holder {
        min-height: 60px;
    }

    .explanation-text {
        font-size: 0.8rem;
        min-height: 40px;
    }

    .draggable-card {
        width: 55px;
        height: 55px;
        font-size: 1.2rem;
    }

    .cards-container {
        padding: 1rem;
        margin: 1rem auto;
        gap: 0.5rem;
    }
}

.save-config-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.save-config-form .form-control {
    flex: 1;
}

.save-config-form .form-select {
    width: auto;
    min-width: 150px;
}