// ------------------------------------------------------------------
//
// MODAL
//
// ------------------------------------------------------------------

#redactor-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	overflow: auto;
	margin: auto;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, .95);
}
#redactor-modal-box {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	overflow-x: hidden;
	overflow-y: auto;
}
#redactor-modal {

	position: relative;
	margin: auto;
	margin-top: 16px;
	padding: 0;
	border-radius: 5px;
	background: #fff;
	box-shadow: 0 4px 40px rgba(0, 0, 0, .15);
	color: #000;
	font-size: 14px;
	font-family: $ui-font-family;

	@media (max-width: 768px) {
	    font-size: 16px !important;
	}

	@media (max-width: 768px) {
		& .redactor-modal-tab-side {
			float: none;
			margin-right: 0;
			margin-bottom: 24px;
			width: auto;
		}
		& .redactor-modal-tab-area {
			float: none;
			width: auto;
		}
	}

	& #redactor-modal-header {
        padding: 20px 24px;
        border-bottom: 1px solid rgba(0, 0, 0, .05);
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        background: #f5f5f5;
        color: #000;
        font-weight: bold;
        font-size: 16px;
	}
	& #redactor-modal-close {
        position: absolute;
        top: 10px;
        right: 4px;
        padding: 0;
        width: 30px;
        height: 40px;
        outline: none;
        border: 0;
        background: none;
        box-shadow: none;
        color: rgba(0, 0, 0, .4);
        text-align: center;
        font-weight: 300;
        font-size: 30px;
        cursor: pointer;
        -webkit-appearance: none;
		&:hover {
			color: #000;
		}
	}
	& #redactor-modal-body {
		overflow: auto;
		padding: 40px 48px 24px 48px;

		@media (max-width: 768px) {
		    padding: 24px;
		}

		& section {
			margin-bottom: 24px;
		}
		& label {
            display: block;
            margin-bottom: 4px;
            font-weight: bold;
            font-size: 12px;
			& .desc {
				color: rgba(0, 0, 0, .5);
				font-weight: normal;
			}
			&.checkbox {
				font-weight: normal;
				font-size: 16px;
			}
		}
	}

	& select,
	& input[type="text"],
	& input[type="password"],
	& input[type="email"],
	& input[type="url"],
	& input[type="number"],
	& textarea {
        position: relative;
        z-index: 2;
        box-sizing: border-box;
        margin: 0;
        padding: 8px;
        width: 100%;
        height: 40px;
        border: 1px solid #ddd;
        border-radius: 3px;
        background-color: white;
        box-shadow: none;
        color: #333;
        font-size: 14px;
        font-family: $ui-font-family;

        @media (max-width: 768px) {
            font-size: 16px;
        }

        &:focus {
            @include transition-redactor(border .3s ease-in);
            outline: none;

            border-color: #aaa;
        }
	}
	& textarea {
		display: block;
		line-height: 1.4em;
	}

	& button {
        margin: 0;
        margin-right: 8px;
        margin-bottom: 8px;
        padding: 13px 24px 14px 24px;
        height: 40px;
        outline: none;
        border: 1px solid transparent;
        border-radius: 4px;
        background-color: #eee;
        color: #000;
        text-align: center;
        text-decoration: none;
        font-weight: normal;
        font-size: 13px;
        font-family: $ui-font-family;
        line-height: 1;
        cursor: pointer;

        &:hover {
            background: none;
            background: #ddd;
            color: #777;

            text-decoration: none;
        }

        &.redactor-modal-button-offset {
            margin-left: 24px;
        }

        &#redactor-modal-button-delete {
            background: color($red);
            color: #fff;
            &:hover {
                filter: brightness(95%);
            }
        }
        &#redactor-modal-button-action {
            background: none;
            background-color: color($green);
            color: #fff;
            &:hover {
                filter: brightness(95%);
            }
        }
    }

	& .redactor-group {
		@include clearfix;
	}

	& .redactor-modal-tab-side {
		float: left;
		margin-right: 6%;
		width: 26%;
	}
	
	& .redactor-modal-tab-area {
		float: left;
		width: 66%;
	}
}

#redactor-modal-tabber {
	margin-bottom: 40px;
	font-size: 12px;
	& a {
		margin-right: -1px;
		padding: 8px 15px;
		border: 1px solid #ddd;
		color: #000;
		text-decoration: none;
		line-height: 1;
		&:hover {
			border-color: rgba(31,120,216,1);
			background-color: rgba(31,120,216,1);
			color: #fff;
		}
		&.active {
			border-color: #ddd;
			background-color: rgba(0, 0, 0, .05);
			color: rgba(0, 0, 0, .5);
			cursor: default;
		}
	}
}

#redactor-modal-list {
	overflow-x: auto;
	margin-left: 0;
	padding-left: 0;
	max-height: 250px;
	list-style: none;
	& li {
		border-bottom: 1px solid rgba(0, 0, 0, .07);
		&:last-child {
			border-bottom: none;
		}
	}
	& a {
		position: relative;
		display: block;
		padding: 16px 4px;
		color: #000;
		text-decoration: none;
		font-size: 15px;
		&:hover {
			background-color: #eee;
		}
	}
}
