.ext-el-mask {
	background-color: $white;
}

/* Override EXtJS's CSS when dragging an popup */
.x-panel-ghost > ul {
	border-color: transparent;
}
.x-panel-ghost, .x-panel-ghost .x-window-tl {
	background-color: #f8f8ff;
	border-color: transparent;
}
.x-panel-ghost .x-window-tl {
	border-color: transparent;
}

.x-panel-ghost .x-window-tl {
	background: #f8f8ff !important;
}

.x-panel-ghost .x-window-header-text {
	color: $dark-grey !important;	
}

// Error and warning dialog border colors
.x-window.k-error-dialog {
	border-left: 2px solid #DC3023;
}

.x-window.k-warning-dialog {
	border-left: 2px solid #E08A1E;
}

.x-window .ext-mb-text {
	color: #5f6368;
}

.x-window .x-panel-header {
	font-weight: bold;
	border-bottom: 1px solid lightgrey;
	background: $white;
}

// x-window and x-panel-ghost items
.x-window,
.x-panel-ghost {
	box-shadow: rgba(0, 0, 0, 0.45) 0px 1px 5px 0;

	/* header */
	.x-window-tl {
		padding-left: $padding-large;
		background: $white;

		.x-window-tr {
			padding-right: 0;
			background: none;

			.x-window-tc {
				background: none;

				.x-window-header {
					padding: 0;
					height: $header-height;

					.x-tool {
						position: relative;
						z-index: 10;
						opacity: 0.6;
					}

					.x-tool:hover {
						opacity: 1;
					}

					.x-tool-close {
						width: 2 * $padding-large + 7px;
						height: $header-height;
					}

					.x-tool-minimize {
						width: 2 * $padding-large + 7px;
						height: $header-height;
					}

					.x-window-header-text {
						color: $dark-grey2;
						font-weight: normal;
						line-height: $header-height;
						display: block;
						left: $padding-large;
						height: $header-height;
						overflow: hidden;
						font-size: $font-size-large;
						text-overflow: ellipsis;
						white-space: nowrap;
					}

				}
				.x-window-header.icon_favorites {
					background-image: none !important;

					.x-window-header-text {
						padding-right: 16px + $padding-medium;
						background-position-x: right;
					}
				}
			}
		}
	}

	/* body */
	.x-window-bwrap {
		background: $background-color-main;

		.x-window-ml {
			padding-left: 0;
			background: none;

			.x-window-mr {
				padding-right: 0;
				background: none;

				.x-window-mc {
					border: none;
					background: none;
				}
			}
		}

		.x-window-body {
			> div {
				> .x-panel {
					/* panel header */
					> .x-panel-header {
						background: $background-color-main;
						line-height: $font-default-line-height;
						padding: 1px $padding-large 2px;
						border-bottom: 1px solid $grey;
						color: $font-default-color;
						font-weight: normal;
					}

					> .x-panel-bwrap {
						> .x-panel-body {
							padding: $padding-large $padding-large 0;
						}
						> .x-panel-footer {
							padding: $padding-large;
						}
						/* buttons in the footer toolbar */
						> .x-panel-footer.x-panel-btns {
							td.x-toolbar-cell {
								padding: 0 $padding-small;
							}
							.x-toolbar-left-row {
								td.x-toolbar-cell:first-child {
									padding-left: 0;
								}
							}
							.x-toolbar-right-row {
								td.x-toolbar-cell:last-child {
									padding-right: 0;
								}
							}
						}
					}
				}

				/* tabpanels need to stretch to the whole panel width to have the border-bottom stretch to the full width */
				> .x-panel.tabpanel-container {
					> .x-panel-bwrap {
						> .x-panel-body {
							padding: 0;

							> .x-tab-panel {
								> .x-tab-panel-bwrap {
									> .x-tab-panel-body {
										padding: $padding-large $padding-large;
									}
								}
							}
						}
					}
				}
			}
		}
	}

	/* footer */
	.x-window-bl {
		background: none;
		padding-left: 0;

		.x-window-br {
			background: none;

			.x-window-bc {
				background: none;
				
				.x-window-footer {
					padding-top: 20px;
				}
			}
		}
	}

	 .x-panel-nofooter .x-window-bc {
	 	display: none;
	 }

	.x-window-bbar {
		.x-toolbar {
			border-top-color: $grey;
		}
	}

	/***************************************
	 *  Specific popups
	 * ************************************/
	/* Copy/move dialog */
	.copymove-panel {
		.copymove-tree-panel {
			.x-form-item {
				margin-bottom: 0;
			}
		}
	}

	.x-form-display-field.tree-header {
		line-height: $font-default-line-height;
		padding: 2px 0 2px;
	}

	.x-tree-node.zarafa-tree-root-container .x-tree-node-el {
		padding-left: $padding-medium;
	}


	/* Folder properties dialog */
	.x-window-bwrap {
		.x-window-body {
			> div {
				.zarafa-folderproperties.x-panel.tabpanel-container {
					> .x-panel-bwrap {
						> .x-panel-body {
							padding: 0;

							> .x-tab-panel {
								> .x-tab-panel-bwrap {
									> .x-tab-panel-body {
										/* Set the padding not on this panel because it contains lines
										 * that need to span the full width of the window */
										padding-left: 0;
										padding-right: 0;
										padding: 0;
									}
								}
							}
						}
					}

					/* General tab */
					.tab-general {
						form {
							> .x-panel > .x-panel-bwrap > .x-panel-body {
								padding: 0 $padding-large;
							}

							.x-form-item-label {
								padding: 0 ($padding-medium - 1) 0 0;
							}

							.x-form-item {
								margin: 0;
								padding: 0;
								line-height: $font-default-line-height;
							}
						}

						.display-name {
							padding-top: ($header-height - 1 - $font-default-line-height) / 2;
							padding-bottom: ($header-height - 1 - $font-default-line-height) / 2;
							padding-left: (16 + $padding-medium);
							line-height: $font-default-line-height;
							background-position: 0 ($header-height - 1 - 17)/2 !important;
							background-repeat: no-repeat;
							font-weight: bold;
							font-size: $font-size-large !important;
						}


					    .description-panel {
					    	> .x-panel-bwrap > .x-panel-body {
					    		padding-top: $padding-extra-large !important;
					    		padding-bottom: $padding-large !important;
					    	}
					    }
					    .content-info-panel {
					    	> .x-panel-bwrap > .x-panel-body {
					    		padding-top: $padding-extra-large !important;
					    		padding-bottom: $padding-extra-large - $padding-medium !important;
					    	}
					    }
					}

					/* Permissions tab */
					.tab-permissions {
						.userlist-panel {
							border-bottom: 1px solid $grey;

							> .x-panel-bwrap {
								.x-panel-body {
									padding: $padding-large $padding-large 0;
								}
							}
						}

						.profile-panel {
							padding: $padding-medium $padding-large;
						}
						.permissions-panel {
							padding: 0 $padding-large;

							fieldset {
								padding-bottom: $padding-medium;

								.x-column .x-column {
									padding-bottom: $padding-extra-extra-large;
								}

								fieldset {
									position: relative;
									margin-top: $font-default-line-height + $padding-small;
									margin-right: $padding-small;
									padding-bottom: $padding-small;
									overflow: visible;

									legend {
										position: absolute;
										top: - ($font-default-line-height + $padding-small);
										left: $padding-medium;
									}

									.x-column {
										padding-bottom: 0 !important;

										.x-form-item {
											margin-bottom: 0;

											.x-form-item .x-form-item {
												padding-bottom: $padding-small;
											}
										}
									}
								}
								fieldset:nth-last-child(0n+2) {
									margin-right: 0;
								}
							}
						}
					}
				}
			}
		}
	}
}

/* Checkbox in MessageBox */
.k-cb-dontshowagain {
	margin-top: $padding-extra-extra-large;
}

/* Reminder dialog */
.zarafa-reminder-dialog-active-reminder-icon {
	width: 24px;
	height: 25px;
	float: left;
}

.zarafa-reminder-dialog-active-reminder-subject
{
	font-weight: bold;
}
.zarafa-reminder-dialog-snooze, .zarafa-reminder-dialog-active-reminder
{
	padding:8px;
}

/* Address book dialog */
.k-abuserselectionpanel,
.k-abmultiuserselectionpanel,
.k-addressbookpanel {
	> .x-panel-bwrap > .x-panel-body {
		padding-top: $padding-medium !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	.k-addressbookmainpanel-header,
	.k-addressbookmainpanel-grid {
		padding-left: $padding-large !important;
		padding-right: $padding-large !important;
	}

	.k-addressbookmainpanel-header {
		padding-bottom: $padding-small;
		border-bottom: 1px solid $grey;

		label.x-form-item-label {
			text-align: right;
		}

		/* search button */
		.icon_magnifier {
			background-color: transparent;
			width: $button-small-height;
		}
	}
}

.k-addressbookpanel {
	padding-bottom: $padding-small;
}

.k-abmultiuserselectionpanel {
	> .x-panel-bwrap > .x-panel-body {
		padding-bottom: $padding-small !important;
	}

	.k-addressbookmainpanel {
		padding-bottom: $padding-large;
	}
	.zarafa-addressbook-dialog-compositefield {
		padding-left: $padding-large;
		padding-right: $padding-large;
	}
}

/* Task send conformation dialog */
.k-send-taskrequest-confirmation-panel {
	.x-form-display-field {
		padding-bottom: 10px;
	}
}

/* Custom flag and reminder panel */
.k-custom-flag-panel {
  > .x-panel-bwrap {
    > .x-panel-body {
      padding: 0 !important;
    }
  }
  .k-custom-reminder-panel, .k-custom-date-panel {
    > .x-panel-bwrap {
      > .x-panel-body {
        padding: $padding-large;
        border-top : none;
		border-left: none;
		border-right: none;
      }
    }
  }
}

.k-recipient-card-view {
	.x-panel > .x-panel-bwrap > .x-panel-body {
		padding-top: $padding-medium !important;
	}
}

/* Custom message box with show more details  */
.x-window.k-show-more-details {
	.x-dlg-icon {
		display: flex;
		align-items: center;
	}

	.k-show-more-details-textarea {
		margin-top: 10px;
	}
}

.x-window.k-show-more-details .x-dlg-icon .ext-mb-content {
	margin-left: 0 !important;
}

