/*

Window.css for Mocha UI

Theme: Default

Copyright:
	Copyright (c) 2007-2009 Greg Houston, <http://greghoustondesign.com/>.

License:
	MIT-style license.

Required by:
	Window.js and Modal.css

*/

/* Windows
---------------------------------------------------------------- */

.mocha {
    background-color: var(--color-background-default);
    border-radius: 5px;
    box-shadow: rgb(51 51 51) 0 1px 5px;
    display: none;
    overflow: hidden;
}

.mochaOverlay {
    background-color: var(--color-background-default);
    border-radius: 5px;
    height: auto !important; /* also fixes out of block issue */
    left: 0;
    position: absolute; /* This is also set in theme.js in order to make theme transitions smoother */
    top: 0;
}

/*

	We get a little creative here in order to define a gradient in the CSS using a query
	string appended to a background image.

	"from" is the top color of the gradient. "to" is the bottom color of the gradient.

	Both must be hex values without the leading # sign.

*/

.mochaTitlebar {
    background-color: var(--color-background-default);
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
}

.mochaTitlebar h3 {
    background-size: 16px !important; /* override mocha titlebar logo inline style */
    font-size: 12px;
    font-weight: bold;
    line-height: 15px;
    overflow: hidden;
    padding: 5px 10px 4px 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mochaToolbarWrapper {
    background-color: var(--color-background-popup);
    height: auto !important;
    overflow: hidden;
    position: relative;
    width: 100%; /* For IE */
}

div.mochaToolbarWrapper.bottom {
    border: 0;
    border-bottom: 1px solid var(--color-border-default);
}

.mochaToolbar {
    border-top: 1px solid var(--color-border-default);
    height: auto !important;
    padding-top: 4px;
    width: 100%; /* For IE */
}

.mochaContentBorder {
    border-bottom: 1px solid var(--color-border-default);
    border-top: 1px solid var(--color-border-default);
}

/* Has a fixed height and scrollbars if required. */
.mochaContentWrapper {
    background-color: var(--color-background-popup);
    font-size: 12px;
    overflow: auto;
}

.mochaContent {
    padding: 10px 12px;
}

.mocha .handle {
    background: #00ff00;
    font-size: 1px; /* For IE6 */
    height: 3px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 3px;
    z-index: 2;
}

/* Corner resize handles */
.mocha .corner {
    background: #ff0000;
    height: 10px;
    width: 10px;
}

/* Bottom right resize handle */
.mocha .cornerSE {
    background-color: var(--color-background-default);
    height: 20px;
    width: 20px;
}

.mochaControls {
    height: 14px;
    position: absolute;
    right: 6px;
    top: 6px;
    width: 52px;
    z-index: 4;
}

/*
	To use images for these buttons:
	1. Set the useCanvasControls window option to false.
	2. If you use a different button size you may need to reposition the controls.
	   Modify the controlsOffset window option.
	2. Replcac the background-color with a background-image for each button.

*/
.mochaMinimizeButton,
.mochaMaximizeButton,
.mochaCloseButton {
    cursor: pointer;
    float: right;
    height: 14px;
    margin-left: 5px;
    position: relative;
    width: 14px;
    z-index: 4;
}

.mochaMaximizeButton::before,
.mochaMaximizeButton::after,
.mochaMinimizeButton::before,
.mochaCloseButton::before,
.mochaCloseButton::after {
    background-color: var(--color-text-default);
    border-radius: 1px;
    content: "";
    height: 2px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
}

.mochaMaximizeButton::after {
    height: 9px;
    width: 2px;
}

.mochaCloseButton::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.mochaCloseButton::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.mochaMinimizeButton {
    margin-left: 0;
}

.mochaSpinner {
    background: url("../images/spinner.svg") no-repeat;
    bottom: 7px;
    display: none;
    height: 16px;
    left: 6px;
    position: absolute;
    width: 16px;
}

.mochaErrorIcon {
    background: url("../images/error.svg") no-repeat;
    background-size: 16px;
    bottom: 7px;
    height: 16px;
    left: 6px;
    position: absolute;
    width: 16px;
}

.mochaIframe {
    width: 100%;
}

/* Fix for IE6 select z-index issue */
.zIndexFix {
    border: 1px solid transparent;
    display: block;
    /*filter: mask();*/
    height: 100px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100px;
    z-index: -1;
}

/* Viewport overlays
---------------------------------------------------------------- */

#modalOverlay {
    background: hsl(0deg 0% 0% / 30%);
    display: none;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10000;
}

/* Fix for IE6 select z-index issue */
#modalFix {
    display: none;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 9999;
}

/* Underlay */

#windowUnderlay {
    background: #ffffff;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
}

* html #windowUnderlay {
    position: absolute;
}

.windowClosed {
    display: none;
    left: -20000px;
    overflow: hidden;
    position: absolute;
    top: -20000px;
    visibility: hidden;
    z-index: -1;
}

.windowClosed .mochaContentBorder,
.windowClosed .mochaToolbarWrapper,
.windowClosed .mochaTitlebar,
.windowClosed .mochaControls {
    display: none;
    left: 0;
    position: absolute;
    top: 0;
    visibility: hidden;
    z-index: -1;
}

/* Modals */

.modal2 {
    border: 8px solid #ffffff;
}

.modal2 .mochaContentBorder {
    border-width: 0;
}

/* Window Themes */

.mocha.no-canvas {
    background: #e5e5e5;
    border: 1px solid #555555;
}

.mocha.no-canvas .mochaTitlebar {
    background: #e5e5e5;
}

.mocha.transparent .mochaTitlebar h3 {
    color: #ffffff;
    display: none;
}

.mocha.transparent .mochaContentWrapper {
    background: transparent;
}

.mocha.notification {
    background: #cedff2;
}

.mocha.notification .mochaTitlebar {
    opacity: 0;
}

.mocha.notification .mochaContentBorder {
    border-width: 0;
}

.mocha.notification .mochaContentWrapper {
    background: transparent;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

/* This does not work in IE6. */
.isFocused.jsonExample .mochaTitlebar h3 {
    color: #ffffff;
}

#fxmorpherExample .mochaContentWrapper {
    background: #577a9e;
}

#clock {
    background: #ffffff;
}

/* iOS iframe scrolling */
.windowFrame .mochaContentWrapper {
    /* scroll the Window content. !important required. */
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
}

.windowFrame .mochaContent {
    height: 100%;
}

.windowFrame iframe {
    /* fix double scroll bar by reducing frame height. !important required. */
    height: calc(100% - 5px) !important;
}
