/* DGA Design System checkbox - top alignment for long labels, RTL-friendly */

.dga-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.5;
    cursor: default;
}

.dga-checkbox-control {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
}

/* Visual box: square, rounded, DGA green when checked/enabled, dark when disabled */
.dga-checkbox-box {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    border: 2px solid #019E87;
    border-radius: 4px;
    background-color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s;
}

.dga-checkbox-box--checked {
    background-color: #019E87;
    border-color: #019E87;
}

.dga-checkbox-box--indeterminate {
    background-color: #019E87;
    border-color: #019E87;
}

.dga-checkbox-box--disabled {
    border-color: #6c757d;
    background-color: #fff;
}

.dga-checkbox-box--disabled.dga-checkbox-box--checked,
.dga-checkbox-box--disabled.dga-checkbox-box--indeterminate {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Native input overlaid for focus/click/keyboard; visually hidden */
.dga-checkbox-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.dga-checkbox-input:disabled {
    cursor: not-allowed;
}

.dga-checkbox-control:focus-within .dga-checkbox-box {
    outline: 2px solid #019E87;
    outline-offset: 2px;
}

/* Icons: white check and dash */
.dga-checkbox-icon {
    display: block;
    color: #fff;
}

.dga-checkbox-icon--check {
    width: 0.4rem;
    height: 0.7rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 0.15rem;
}

.dga-checkbox-icon--indeterminate {
    width: 0.65rem;
    height: 2px;
    background-color: #fff;
    border-radius: 1px;
}

/* Label: first-line top alignment (wrapper already align-items: flex-start) */
.dga-checkbox-label {
    display: block;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.dga-checkbox-label-text {
    display: block;
}

.dga-checkbox-description {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* RTL: gap and label order handled by flex; no change needed when dir=rtl */
[dir="rtl"] .dga-checkbox-wrapper {
    flex-direction: row;
}
