/*

Copyright 2010, Google Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
    * Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,           
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY           
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

/* Glass Design System Variables */
:root {
  /* Spacing System (8px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  
  /* Legacy Padding Variables */
  --padding-tighter: var(--space-1);
  --padding-tight: var(--space-2);
  --padding-normal: var(--space-3);
  --padding-loose: var(--space-4);
  
  /* Glass Colors */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  
  /* Text Colors */
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  
  /* Background Colors */
  --background-primary: #ffffff;
  --background-secondary: #f8f9fa;
  --background-light: #fafbfc;
  
  /* Border Colors */
  --border-color: #e9ecef;
  --border-subtle: #dee2e6;
  --border-strong: #adb5bd;
  
  /* Interactive Colors */
  --hover-color: #f8f9fa;
  --selected-color: rgba(79, 70, 229, 0.1);
  --focus-color: rgba(79, 70, 229, 0.25);
  
  /* Status Colors */
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --success-color: #28a745;
  --info-color: #17a2b8;
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --letter-spacing: -0.01em;
  
  /* Shadows */
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-strong: 0 4px 16px rgba(0, 0, 0, 0.15);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
}

html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, hgroup, menu, nav, section, menu, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

article, aside, figure, footer, header, hgroup, nav, section {
  display: block;
}

ul {
  list-style-position: inside;
}

a {
  margin: 0;
  padding: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

input, select {
  vertical-align: middle;
}

body {
  font-size: 62.5%;
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  color: var(--text-primary);
  letter-spacing: var(--letter-spacing);
  background: linear-gradient(135deg, #ffffff 0%, #fafcff 40%, #f8faff 70%, #f5f8ff 100%);
  min-height: 100vh;
  line-height: 1.5;
}

h1 {
  font-size: 1.8em;
}

h2 {
  font-size: 1.3em;
  font-weight: bold;
}

label {
  cursor: pointer;
}

input[type=text] {
  padding: var(--padding-tighter);
  font-size: 1em;
  font-family: inherit;
  border: #ccc 1px solid;
  border-top: #888 1px solid;
  vertical-align: baseline;
}

a {
  color: var(--link-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a.secondary {
  color: var(--link-secondary);
}

a.selected {
  color: var(--text-primary);
  font-weight: bold;
  cursor: default;
}

a.inaction {
  color: var(--light-grey);
}

a.selected:hover, a.inaction:hover {
  cursor: default;
  text-decoration: none;
}

a img {
  border: 0;
}

.button, a.button, input[type="file"]::file-selector-button {
  display: inline-block;
  overflow: visible;
  font-size: 1em;
  line-height: 1.4;
  color: var(--text-primary);
  text-decoration: none;
  padding: 1px 6px;
  border: 1px solid #bbb;
  cursor: pointer;
  white-space: nowrap;
  font-family: Arial, Helvetica, sans-serif;
  border-radius: 3px;
  background: linear-gradient(#f9f9f9, #e3e3e3);
}


.button:hover, a.button:hover, input[type="file"]::file-selector-button:hover {
  border: 1px solid #666;
}

.button:active, a.button:active, input[type="file"]::file-selector-button:active {
  border: 1px solid #000;
  background: linear-gradient(#e3e3e3, #f9f9f9);
}

.button-primary, a.button-primary {
  font-weight: bold;
  padding: 1px 15px;
}

.button-pill-left, a.button-pill-left {
  border-right: 1px solid #bbb;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.button-pill-right, a.button-pill-right {
  border-left: 1px solid #fff;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.button-disabled, a.button-disabled, .button.button-disabled, a.button.button-disabled {
  color: #666;
  border: 1px solid #ddd;
  background: #f3f3f3;
  cursor: default;
}

.button-disabled:hover, a.button-disabled:hover {
  color: #666;
  border: 1px solid #ddd;
  background: #f3f3f3;
  cursor: default;
}

.button img, a.button img {
  padding-left: 3px;
}

.button-menu, a.button-menu {
  background: url(../images/down-arrow.svg) no-repeat right 6px;
  padding-right: 12px;
}

.form-table th, .form-table td {
  vertical-align: top;
  font-size: 1.3em;
  padding: 2px;
}

.form-table th {
  text-align: left;
  padding-top: 8px;
  font-weight: bold;
}

.list-table {
  width: 100%;
}

.list-table th, .list-table td {
  padding-top: var(--padding-tight);
  text-align: left;
  vertical-align: baseline;
  padding: var(--padding-tighter) var(--padding-tight);
  font-size: 1.1em;
  color: #222;
  border-bottom: dotted 1px var(--faint-grey);
}

.list-table th {
  font-weight: bold;
  color: #444;
  background: #f2f2f2;
}

.list-table-itemname {
  font-size: 1.2em;
}

#loading-message {
  text-align: center;
  font-size: 300%;
  color: var(--light-grey);
  padding: 3em .5em;
}

#loading-message img {
  position: relative;
  top: -4px;
}

#notification-container {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  text-align: center;
}

#notification {
  display: inline-block;
  margin: 0 auto;
  padding: 5px 8px 4px;
  font-size: 1.3em;
  text-align: left;
  font-weight: bold;
  background: var(--notification-primary);
  border-radius: 2px;
}

.notification-action {
  padding-left: 10px;
}

.notification-loader {
  padding: 0 3px 0 0;
  opacity: 0.3;
}

.toggle-text {
  font-size: x-small;
  border-bottom: 1px blue dotted;
}

#header {
  height: 40px;
  padding: 10px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  background: linear-gradient(135deg, #fafbff 0%, #f8f9ff 50%, #f3f4ff 100%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

#header h1 {
  margin: 0 .2em;
  color: var(--text-primary);
  font-family: serif;
  font-size: 1.8em; /* to avoid being styled by pure.css from the database extension */
}

#header img {
  height: 30px;
}

#app-home-button {
  display: flex;
  align-items: center;
}

#app-home-button:hover {
  text-decoration: none;
}

#body-info {
  margin: 0 40px;
}

#body-info p {
  font-size: 1.3em;
  margin: 1.3em;
  width: 50em;
  line-height: 1.3;
}

#body-info h1 {
  font-size: 3.0em;
  font-weight: normal;
  color: var(--text-tertiary);
}

#body-info h2 {
  margin: 1.6em 0 .5em 0;
}

#body-info .license, #body-info .errorstack {
  font-family: monospace;
  font-size: 1.3em;
  white-space: pre;
  border: 1px solid #ddd;
  background: #eee;
  padding: var(--padding-looser);
  width: 60em;
  overflow: auto;
}

#body-info ul {
  font-size: 1.3em;
  margin: .5em 0 2em;
}

#body-info li {
  margin: 0.4em;
}

input[type="checkbox"], input[type="radio"], select {
  vertical-align: baseline;
}

input.inline {
  vertical-align: middle;
}

input[type='text'].inline {
  vertical-align: baseline;
}

input.lightweight {
  vertical-align: baseline;
  border: none;
  border-bottom: 1px solid var(--faint-grey);
  padding: 0px 2px 1px 2px;
}


div.grid-layout>table {
  border-collapse: separate;
}

div.grid-layout.layout-full>table {
  width: 100%;
  max-width: 100% !important;
}

div.grid-layout>table>tbody>tr>th,
div.grid-layout>table>tbody>tr>td {
  padding: 0px;
  text-align: left;
  vertical-align: baseline;
}

div.grid-layout.grid-layout-for-text>table>tbody>tr>th,
div.grid-layout.grid-layout-for-text>table>tbody>tr>td {
  vertical-align: middle;
}

div.grid-layout.grid-layout-for-ui>table>tbody>tr>th,
div.grid-layout.grid-layout-for-ui>table>tbody>tr>td {
  vertical-align: top;
}

div.grid-layout.layout-normal {
  margin: -10px;
}

div.grid-layout.layout-normal>table {
  border-spacing: 10px;
}

div.grid-layout.layout-tight {
  margin: -7px;
}

div.grid-layout.layout-tight>table {
  border-spacing: 7px;
}

div.grid-layout.layout-tighter {
  margin: -5px;
}

div.grid-layout.layout-tighter>table {
  border-spacing: 5px;
}

div.grid-layout.layout-tightest {
  margin: -3px;
}

div.grid-layout.layout-tightest>table {
  border-spacing: 3px;
}

div.grid-layout.layout-loose {
  margin: -15px;
}

div.grid-layout.layout-loose>table {
  border-spacing: 15px;
}

div.grid-layout.layout-looser {
  margin: -20px;
}

div.grid-layout.layout-looser>table {
  border-spacing: 20px;
}

div.input-container {
  padding: 3px;
}

div.input-container>input, div.input-container>textarea {
  display: inline-block;
  width: 100%;
  padding: 2px;
  border: 1px inset;
  margin-left: -3px;
  margin-top: -3px;
  vertical-align: top;
}

input.code, textarea.code {
  font-family: monospace;
}

img {
  vertical-align: middle;
}

.hidden {
  display: none;
}

.fbs-pane, .fbs-flyout-pane {
  z-index: 2000;
}

.ui-widget {
  font-family: inherit;
  font-size: inherit;
}

.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
  font-family: inherit;
  font-size: inherit;
}

p.body-text {
  margin-bottom: 1em;
}

.relative-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.float-apart {
  display: flex;
  justify-content: space-between;
}

.padding-loose {
  padding: var(--padding-loose);
}
