body {
    font:               8pt "Open Sans", "Helvetica Neue", sans-serif;
    line-height:        1.88889;
    color:              #000000;
    background:         #f9f8f7;
    overflow:           hidden;
    margin:             0;
    padding:            0;
}

* {
    target-new:         tab ! important;
}

a:link, a:active, a:visited {
    color:              #b55;
    text-decoration:    none;
}
a:hover {
    color:              #633;
    text-decoration:    underline;
}

.unselectable {
    user-select:        none;
    -moz-user-select:   none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -ms-user-select:    none;
}

.invisible {
    opacity:            0;
    filter:             alpha(opacity=0);
    z-index:            1000;
    position:           absolute;
    left:               0;
}

.editable:invalid {
    background-color:   #fbb;
}

.closebutton {
    display:            none;
    background-image:   url(deleteButton.png);
    position:           absolute;
    left:               -15px;
    top:                -15px;
    height:             30px;
    width:              30px;
    z-index:            14;
}
.closebutton:active {
    background-image:   url(deleteButtonPressed.png);
}

/* the SVG graph used as the main interface */
#graph {
    position:           absolute;
    top:                0px;
    left:               0px;
    width:              100%;
    height:             100%;
    z-index:            1;
}

/* minature - positioned in the southeast corner */
#miniature {
    position:           absolute;
    bottom:             40px;
    right:              42px;
    background-color:   #fff;
    z-index:            2;
    box-shadow:         0px 5px 10px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 5px 10px rgba(0, 0, 0, 0.5);
}
#minigraph {
    display:            block;
}

#search {
    position:           absolute;
    top:                42px;
    left:               50%;
    margin-left:        -150px; /* half of the actual width */
    display:            block;
    z-index:            9;
}
#search input {
    width:              150px;
    text-align:         left;
    background-color:   rgba(255, 255, 255, 0.9);
}
#search select {
    width:              150px;
    text-align:         left;
    background-color:   rgba(255, 255, 255, 0.9);
}

/* shows a beta disclaimer */
#disclaimer {
    display:            none;
    position:           absolute;
    font:               bold 48pt sans-serif;
    color:              white;
    top:                42px;
    left:               16px;
    z-index:            0;
}

/* the logotype 'ANCHOR' */
#logotype {
    position:           absolute;
    z-index:            1;
    display:            block;
    left:               12px;
    bottom:             6px;
    width:              142px;
}

/* shows login status to the cloud (google app engine) */
#cloud {
    font:               8pt sans-serif;
    position:           absolute;
    color:              black;
    text-align:         left;
    bottom:             40px;
    left:               12px;
    cursor:             pointer;
    display:            block;
    z-index:            10;
}

/* shows model name if cloud based or local */
#model {
    font:               8pt sans-serif;
    position:           absolute;
    color:              black;
    text-align:         left;
    bottom:             54px;
    left:               12px;
    display:            block;
    z-index:            10;
}

/* context menu that pops up when editing */
#contextMenu {
    position:           absolute;
    top:                0;
    left:               0;
    display:            block;
    background-color:   rgba(236, 234, 234, 0.9);
    color:              black;
    padding:            0;
    margin:             0;
    text-align:         left;
    border:             2px solid #fff;
    z-index:            11;
    box-shadow:         0px 5px 10px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 5px 10px rgba(0, 0, 0, 0.5);
}
#contextMenu .items {
    margin:             10px 10px 5px 10px;
}
#contextMenu .topper {
    font:               10px sans-serif;
    cursor:             move;
    color:              #333;
    height:             15px;
    padding-top:        2px;
    padding-left:       24px;
    border-bottom:      1px solid #888;
    background-color:   rgba(255, 255, 255, 0.8);
}

.toggler {
    position:           absolute;
    color:              #555;
    margin:             0;
    padding:            0;
    border:             1px solid #555;
    width:              16px;
    height:             16px;
    z-index:            12;
}
.expanded {
    cursor:             nw-resize;
    background-color:   #f55;
}
.collapsed {
    cursor:             se-resize;
    left:               -3px;
    top:                -3px;
    background-color:   #fff;
    box-shadow:         0px 5px 10px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 5px 10px rgba(0, 0, 0, 0.5);
}
.collapsed:hover {
    background-color:   #fa5;
}

.operators {
    position:           relative;
    margin:             0px 5px 5px 5px;
    top:                0;
    left:               0;
}

.operator {
    margin:             0;
    line-height:        25px;
    text-align:         left;
    cursor:             pointer;
    white-space:        nowrap;
    padding-right:      10px;
    padding-left:       10px;
    z-index:            8;
}

.operator:hover {
    color:              white;
    background-color:   rgba(128, 128, 128, 0.8);
    text-decoration:    none;
    text-shadow:        0px 0px 6px #555;
}


/* is used in the code popover */
#modalBackground {
    position:           absolute;
    top:                0;
    left:               0;
    background-color:   rgba(128, 128, 128, 0.3);
    margin:             0;
    padding-top:        25%;
    overflow:           hidden;
    z-index:            10;
    text-align:         center;
    color:              white;
    font-family:        sans-serif;
    font-size:          25pt;
    font-weight:        bold;
    text-shadow:        0px 3px 5px rgba(0, 0, 0, 0.5);
}

#urlPopover {
    position:           relative;
    border:             2px solid white;
    top:                5%;
    margin:             auto;
    display:            table;
    background-color:   rgba(249, 248, 247, 0.95);
    box-shadow:         0px 10px 20px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 10px 20px rgba(0, 0, 0, 0.5);
    z-index:            11;
}
#urlPopover .closebutton {
    display:            inherit;
    position:           relative;
}
#urlPopover #content {
    margin-top:         -30px;
    padding:            0;
}


#cloudBrowserPopover {
    position:           relative;
    border:             2px solid white;
    top:                5%;
    margin:             auto;
    display:            table;
    background-color:   rgba(249, 248, 247, 0.95);
    box-shadow:         0px 10px 20px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 10px 20px rgba(0, 0, 0, 0.5);
    z-index:            11;
}
#cloudBrowserPopover .closebutton {
    display:            inherit;
    position:           relative;
}
#cloudBrowserPopover #content {
    margin:             -10px 10px 20px 10px;
    padding:            0;
}
.modelContainer {
    text-align:         left;
    color:              black;
    border-width:       medium;
    border-style:       inset;
    margin:             0px 5px 10px 5px;
    padding:            8px;
    cursor:             pointer;
    height:             140px;
}
.modelIcon {
    background:         #fff;
    border:             1px solid black;
    width:              140px;
    max-height:         140px;
    clip:               rect(0px,140px,140px,0px);
    float:              left;
    clear:              both;
    margin-right:       10px;
    box-shadow:         0px 3px 5px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 3px 5px rgba(0, 0, 0, 0.5);
}
.externalLink {
    margin-left:        0.5em;
}
.modelName {
    font:               100% georgia, sans-serif;
}
.modelKeywords {
    font:               italic 75% georgia, sans-serif;
}
.modelDescription {
    margin-top:         8pt;
    font:               90% georgia, sans-serif;
}
.twitter {
    margin-top:         8pt;
    font:               italic 90% georgia, sans-serif;
}
#keywordFilter {
    position:           relative;
    text-align:         center;
    top:                -20px;
    font:               10pt georgia, sans-serif;
}
.modelDeleteButton  {
    border-style: hidden;
    display: block;
    margin: -8px -2px -20px;
    padding: 0;
    background-image:   url(deleteButton.png);
    position:           relative;
    left:               -15px;
    top:                -15px;
    height:             30px;
    width:              30px;
    z-index:            14;
}

#cloudSaverPopover {
    position:           relative;
    border:             2px solid white;
    top:                5%;
    margin:             auto;
    display:            table;
    background-color:   rgba(249, 248, 247, 0.95);
    box-shadow:         0px 10px 20px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 10px 20px rgba(0, 0, 0, 0.5);
    z-index:            11;
}
#cloudSaverPopover .closebutton {
    display:            inherit;
    position:           relative;
}
#cloudSaverPopover #content {
    margin:             -10px 10px 10px 10px;
    padding:            0;
    text-align:         center;
}
#cloudSaverPopover #content table {
    margin-top:         20px;
    margin-bottom:      20px;
}
#cloudSaverPopover #content td {
    font:               84% georgia, sans-serif;
    color:              black;
    padding-top:        5px;
    text-align:         left;
}
#cloudSaverPopover #content img {
    background:         #fff;
    border:             1px solid black;
    box-shadow:         0px 3px 5px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 3px 5px rgba(0, 0, 0, 0.5);
}


/* these classes style the xml representation */
#codePopover {
    position:           relative;
    border:             2px solid black;
    top:                5%;
    margin:             auto;
    display:            table;
    background-color:   rgba(8, 0, 0, 0.8);
    box-shadow:         0px 10px 20px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 10px 20px rgba(0, 0, 0, 0.5);
    z-index:            11;
}
#codePopover .closebutton {
    display:            inherit;
    position:           relative;
}

#content {
    position:           relative;
    margin-top:         -30px;
    text-align:         left;
    font:               125% "Source Code Pro", "Consolas", "Andale Mono", monospace;
    color:              white;
    padding:            15px 20px;
    overflow:           auto;
    background-color:   transparent;
    z-index:            12;
}
#content .tabs {
    visibility:         hidden;
}
#content .texts {
    color:              #f55;
    font-weight:        bold;
}
#content .brackets {
    color:              white;
}
#content .elements {
    color:              #ffffc0;
}
#content .attributes {
    color:              #c0c0c0;
    font-weight:        bold;
}
#content .values {
    color:              #ffc0c0;
    font-style:         italic;
}
.preformatted, pre {
    font:               100% "Source Code Pro", "Consolas", "Andale Mono", monospace;
    color:              white;
    white-space:        pre;
}


/* Menus and control buttons */
ul, li, table, tr, td {
    list-style-type:    none;
    margin:             0;
    padding:            0;
    border:             0;
    border-collapse:    collapse;
}

td {
    padding:            0px 5px 2px 5px;
}

legend {
    padding:            0.2em 0.5em;
    color:              #555;
    font-size:          90%;
    text-align:         left;
}

#header {
    font:               10pt "Open Sans", "Helvetica Neue", sans-serif;
    position:           relative;
    margin:             0;
    padding:            0;
    top:                0;
    left:               0;
    height:             32px;
    display:            block;
    background-color:   rgba(236, 234, 234, 0.9);
    color:              black;
    border-bottom:      2px solid #fff;
    box-shadow:         0px 0px 10px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 0px 10px rgba(0, 0, 0, 0.5);
    z-index:            7;
}

/* http://www.ie7nomore.com/fun/menu2/ */
/* TODO: position using relative instead */
#actions, #settings, #file, #generate, #about, #defaults, #generation {
    position:           absolute;
    display:            block;
    top:                0px;
    z-index:            42;
}
#file {
    left:               8px;
    text-align:         left;
    z-index:            43;
}
#actions {
    left:               50px;
    text-align:         left;
    z-index:            44;
}
#generate {
    left:               110px;
    text-align:         left;
    z-index:            45;
}
#generation {
    right:              200px;
    text-align:         right;
    z-index:            46;
}
#defaults {
    right:              130px;
    text-align:         right;
    z-index:            45;
}
#settings {
    right:              60px;
    text-align:         right;
    z-index:            44;
}
#about {
    right:              8px;
    text-align:         right;
    z-index:            43;
}
#file .fileSelect {
    width:              200px;
}
.menu {
    margin:             0;
    cursor:             pointer;
    list-style:         none;
    padding-left:       8px;
    padding-right:      8px;
    line-height:        32px;
    display:            inline-block;
}
.menu:hover {
    font-style:         italic;
}
.submenu {
    display:            none;
    position:           relative;
    background-color:   rgba(236, 234, 234, 0.9);
    white-space:        nowrap;
    border:             2px solid #fff;
    box-shadow:         0px 5px 10px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.5);
    -moz-box-shadow:    0px 5px 10px rgba(0, 0, 0, 0.5);
    z-index:            9;
}
.menu:hover > .submenu {
    display:            block;
}
.submenu li {
    height:             25px;
    line-height:        25px;
    list-style-type:    none;
    margin:             0;
    padding-right:      8px;
    padding-left:       8px;
    color:              black;
    font-style:         normal;
    text-decoration:    none !important;
    text-shadow:        none;
    text-align:         left;
}
.submenu a {
    color:              black;
}
.submenu a:hover {
    color:              white;
    text-decoration:    none;
    text-shadow:        0px 0px 6px #555;
}
.submenu li:hover {
    color:              white;
    background-color:   rgba(128, 128, 128, 0.8);
    text-decoration:    none;
    text-shadow:        0px 0px 6px #555;
}
.submenu select {
    width:              108px;
}
.submenu input {
    width:              45px;
}
.submenu .inputDefaults {
    width:              104px;
}

#controls {
    position:           absolute;
    top:                0px;
    left:               50%;
    margin-left:        -200px; /* half of the actual width */
    height:             32px;
    display:            block;
    z-index:            555;
}
#controls .playing {
    background-color:   #fa5;
}
#controls .pausing {
    /* just go back to normal */
}
#controls div {
    cursor:             pointer;
    position:           relative;
    top:                0;
    display:            inline-block;
    width:              100px;
    height:             16px;
    padding:            8px 0 8px 20px;
    margin:             0;
    border:             0;
    background:         #b55;
    color:              #fff;
    text-decoration:    none;
    text-shadow:        0px 0px 6px #777;
    -moz-border-radius: 10px 0 / 40px 0;
    -webkit-border-radius: 10px 0 / 40px 0;
    border-radius:      10px 0 / 40px 0;
    -webkit-transition: .5s;
    -moz-transition:    .5s;
    transition:         .5s;
}
#controls div:hover {
    background:         #f77;
}
#controls div + div {
    margin-left:        -50px;
}
