/* Layout matches the 2011 Cappuccino app pixel-for-pixel:
   a centred 800x500 "window" split into a 325px control panel and a 475px
   result panel. Positions come from AppController.j and MooseView.j. */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    min-height: 100%;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: black;
    background-color: rgb(211, 218, 223);
    background-image: url("Resources/Images/light-bg.png");
    background-repeat: repeat;
}

.page-bg {
    width: 800px;
    margin: 0 auto;
    padding-top: 20px;
    padding-bottom: 40px;
    position: relative;
}

.top-row {
    width: 800px;
    height: 60px;
    position: relative;
    margin-bottom: 20px;
}

.slu-logo {
    position: absolute;
    left: 0;
    top: 0;
    width: 248px;
    height: 50px;
}

.top-right {
    position: absolute;
    right: 0;
    top: 10px;
    text-align: right;
}

.lang-toggle button {
    font-size: 11px;
    padding: 3px 10px;
    margin-left: 4px;
    border: 1px solid #888;
    background: #eee;
    cursor: pointer;
    color: #333;
    border-radius: 3px;
}

.lang-toggle button.active {
    background: #555;
    color: white;
    border-color: #333;
}

.version {
    font-size: 10px;
    color: white;
    text-shadow: none;
    margin-top: 6px;
}

/* Main app window */

.app {
    position: relative;
    width: 800px;
    height: 500px;
    background-image: url("Resources/Images/rosterbg.png");
    background-repeat: repeat;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.left-panel {
    position: absolute;
    left: 0;
    top: 0;
    width: 325px;
    height: 500px;
}

.right-panel {
    position: absolute;
    left: 325px;
    top: 0;
    width: 475px;
    height: 500px;
    background-image: url("Resources/Images/paper-bg.png");
    background-repeat: repeat;
}

.right-panel > * {
    position: absolute;
}

/* Labels — the Cappuccino app set text-shadow: 0 1px 0 white on most
   labels, giving a pressed-in-metal look. We replicate that on the right
   (light paper-bg) panel and invert it on the left (dark roster-bg) panel
   for legibility. */

.label {
    position: absolute;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
    pointer-events: none;
}

.left-panel .label,
.right-panel .label {
    color: #222;
    text-shadow: none;
}

.label.bold { font-weight: bold; }
.label.italic { font-style: italic; }
.label.small { font-size: 11px; }
.label.tiny { font-size: 10px; }
.label.bold-small { font-size: 11px; font-weight: bold; }

.label.unit { font-size: 12px; }
.label.alert {
    font-size: 10px;
    color: #ffe28a;
}

/* Controls */

.slider {
    position: absolute;
    width: 120px;
    height: 20px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.slider::-webkit-slider-runnable-track {
    height: 4px;
    background: linear-gradient(#999, #bbb);
    border: 1px solid #555;
    border-radius: 2px;
}

.slider::-moz-range-track {
    height: 4px;
    background: linear-gradient(#999, #bbb);
    border: 1px solid #555;
    border-radius: 2px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -6px;
    border-radius: 50%;
    background: radial-gradient(#fff, #ccc 70%, #888);
    border: 1px solid #333;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(#fff, #ccc 70%, #888);
    border: 1px solid #333;
    cursor: pointer;
}

.value-text {
    position: absolute;
    height: 22px;
    font-size: 12px;
    padding: 2px 6px;
    border: 1px solid #666;
    border-radius: 11px;
    background: white;
    color: black;
    text-align: right;
}

.dropdown {
    position: absolute;
    height: 24px;
    font-size: 12px;
    padding: 2px 6px;
    border: 1px solid #666;
    border-radius: 4px;
    background: white;
    color: black;
    cursor: pointer;
}

.predator-img {
    position: absolute;
    pointer-events: none;
    user-select: none;
}

#view {
    position: absolute;
    left: 0;
    top: 0;
    width: 475px;
    height: 500px;
    pointer-events: none;
}

.credits {
    width: 800px;
    margin: 10px auto 0;
    text-align: left;
    padding-right: 0;
    font-size: 10px;
    color: white;
    text-shadow: none;
}

.credits a {
    color: white;
    text-decoration: underline;
}

/* Loading overlay */

.loading-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 475px;
    height: 500px;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333;
    z-index: 100;
}

.loading-overlay.hidden { display: none; }

/* When simulation engine is still loading, dim the controls */

.left-panel.disabled .slider,
.left-panel.disabled .value-text,
.left-panel.disabled .dropdown {
    opacity: 0.5;
    pointer-events: none;
}
