/**
 * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
.oc-dialog {
	background: var(--color-main-background);
	color: var(--color-text-light);
	border-radius: var(--border-radius-large);
	box-shadow: 0 0 30px var(--color-box-shadow);
	padding: 24px;
	z-index: 100001;
	font-size: 100%;
	box-sizing: border-box;
	min-width: 200px;
	top: 50%;
	inset-inline-start: 50%;
	transform: translate(-50%, -50%);
	max-height: calc(100% - 20px);
	max-width: calc(100% - 20px);
	overflow: auto;
}

.oc-dialog-title {
	background: var(--color-main-background);
}

.oc-dialog-buttonrow {
	position: relative;
	display: flex;
	background: transparent;
	inset-inline-end: 0;
	bottom: 0;
	padding: 0;
	padding-top: 10px;
	box-sizing: border-box;
	width: 100%;
	background-image: linear-gradient(rgba(255, 255, 255, 0.0), var(--color-main-background));

	&.twobuttons {
        justify-content: space-between;
    }

	&.onebutton,
	&.twobuttons.aside {
		justify-content: flex-end;
	}

	button {
	    white-space: nowrap;
	    overflow: hidden;
		text-overflow: ellipsis;
		height: 44px;
		min-width: 44px;
	}
}

.oc-dialog-close {
	position: absolute;
	width: 44px !important;
	height: 44px !important;
	top: 4px;
	inset-inline-end: 4px;
	padding: 25px;
	background: var(--icon-close-dark) no-repeat center;
	opacity: .5;
	border-radius: var(--border-radius-pill);

	&:hover,
	&:focus,
	&:active {
		opacity: 1;
	}
}

.oc-dialog-dim {
	background-color: #000;
	opacity: .2;
	z-index: 100001;
	position: fixed;
	top: 0;
	inset-inline-start: 0;
	width: 100%;
	height: 100%;
}

body.theme--dark .oc-dialog-dim {
	opacity: .8;
}

.oc-dialog-content {
	width: 100%;
	max-width: 550px;
}

.oc-dialog.password-confirmation {
	.oc-dialog-content {
		width: auto;

		input[type=password] {
			width: 100%;
		}
		label {
			display: none;
		}
	}
}
