/* Dialogs of the Gruppenverwaltung ("Neue Gruppe anlegen",
   "Gruppe endgültig löschen?"), on top of the popUp-* classes in popup.css. */

.group-dialog .popUp {
    max-height: calc(100vh - 32px);
    margin: 0 16px;
    display: flex;
    flex-direction: column;
}

.group-dialog .group-dialog__form,
.group-dialog .group-dialog__credentials {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.group-dialog .popUp-body {
    overflow-y: auto;
}

.group-dialog__row {
    display: flex;
    gap: 16px;
}

.group-dialog__row > .form-group {
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 480px) {
    .group-dialog__row {
        flex-direction: column;
        gap: 0;
    }
}

/* Inline validation */

.group-dialog .form-group input.is-invalid {
    border-color: #dc2626;
}

.group-dialog .form-group input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .15);
}

.group-dialog__error {
    margin-top: 6px;
    font-size: .85rem;
    color: #dc2626;
}

.group-dialog__error:empty {
    display: none;
}

/* Subcategory checkboxes */

.group-dialog__subcategories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 16px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
}

.group-dialog .form-group .group-dialog__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.group-dialog .form-group .group-dialog__subcategories input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
    flex: none;
}

.group-dialog__hint {
    color: #6b7280;
    font-size: .9rem;
}

/* Credentials, shown once after creating */

.group-dialog__notice {
    margin-bottom: 16px;
}

.group-dialog__credential-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 16px;
    align-items: center;
    margin: 0;
    padding: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.group-dialog__credential-list dt {
    font-weight: 500;
    color: #374151;
}

.group-dialog__credential-list dd {
    margin: 0;
    min-width: 0;
}

.group-dialog__credential-list code {
    font-size: 1rem;
    color: #111827;
    word-break: break-all;
    user-select: all;
}

/* Delete */

.group-dialog__warning {
    margin-bottom: 18px;
}

.group-dialog .group-dialog__expected {
    color: #111827;
    font-size: .9rem;
    user-select: all;
}

.group-dialog__btn-danger {
    background: #dc2626;
    color: white;
}

.group-dialog__btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

.group-dialog .popUp-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.group-dialog__clipboard {
    position: fixed;
    top: -1000px;
    opacity: 0;
}
