@import url("reset.css");
@import url("red.css");

html {
    height: 100%; /* Don't remove! This allows sub-elements to use heights in
                     percentage of the screen height. */
}

body {
    background-color: #111;
}

div#banner a {
    outline: none;
}

div#banner a img {
    border-style: none;
    text-decoration: none;
}

div#banner a img#logo {
    width: 574px;
    height: 235px;

    display: block;

    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;

    border-style: solid;
    border-width: 1px;
    border-color: gray;
}

/*
 * The image margins are calculated to place the images in such a way that
 *   a) The images' horizontal middle (i.e. --) are in the middle of the
 *      banner ("ukehashi aikidoklubb")
 *   b) The images' vertical middle (i.e. |) are equally far away from the
 *      banner.
 */
div#banner img#aikido {
    display: block;
    float: left;

    width: 70px;
    height: 136px;

    margin-top: 49px;
    margin-left: 10px;
}

div#banner img#ukehashi {
    display: block;
    float: right;

    width: 64px;
    height: 108px;

    margin-top: 63px;
    margin-right: 16px;
}

/*
 * When using flowing divs, the bounding white div doesn't get sized properly,
 * unless we make sure something is rendered _below_ all the flowing divs.
 *
 * The solution is to render a 1x1 white pixel repeatedly
 */
img.footer {
    width: 90%;
    height: 1px;
}

table#footer {
    clear: both;

    font-size: 0.7em;
    font-family: "Sans Serif", sans-serif;

    margin-left: auto;
    margin-right: auto;

    border-collapse: collapse;
}

table#footer td {
    padding-top: 20px;
}

img.float_right {
    display: block;
    float: right;
}

img.float_left {
    display: block;
    float: left;
}

/*
 * We use a table to 'shrink-wrap' the menu, in order to center it. It would
 * have been better to use a wrapping div with 'display: table' instead, but
 * (as usual) IE sucks and doesn't support that.
 */
table#menu {
    margin-left: auto;
    margin-right: auto;

    border-collapse: collapse;
}

table#menu td {
    padding-top: 15px;
    padding-bottom: 15px;
}

table#menu div {
    float: left;
}

table#menu .bar {
    background-color: grey;

    width: 1px;
    height: 1.2em;

    margin-top: 0.3em;
    margin-right: 1px; /* To account for the 1px width */
}

table#menu .item, table#menu .selected_item {
    padding: 0.2em;
    color: black;

    margin-left: 0.6em;
    margin-right: 0.6em;

    font-size: 100%;
    font-family: "Sans Serif", sans-serif;
}

table#menu .item {
    border-bottom-width: 4px;
    border-bottom-style: solid;
    border-bottom-color: white;
}

table#menu .item:hover {
    border-bottom-width: 4px;
    border-bottom-style: solid;

    -webkit-transition: border-bottom-color 0.5s linear;
    -moz-transition: border-bottom-color 0.5s linear;
    -o-transition: border-bottom-color 0.5s linear;
    transition: border-bottom-color 0.5s linear;
}

table#menu .selected_item {
    border-bottom-width: 4px;
    border-bottom-style: solid;
}

table#menu a {
    color: grey;
    text-decoration: none;
    outline: none;
}

table#menu a:hover {
    color: black;
}

div.main {
    background-color: #fff;

    margin-left: auto;
    margin-right: auto;
    margin-top: 30px;
    margin-bottom: 30px;

    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;

    border-style: solid;
    border-width: 2px;
    border-color: #ccc;
}

div#main {
    width: 20cm;

    padding: 30px;
    padding-bottom: 10px;
}

div#left {
    float: left;

    width: 60%;

    margin-right: 10px;
}

div#right {
    float: right;
    width: 35%;
}

div.container {
    clear: both;
}

div.section {
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;

    margin-top: 20px;

    border-style: solid;
    border-color: gray;
    border-width: 1px;

    -webkit-box-shadow: 0px 0px 7px #888;
    -moz-box-shadow: 0px 0px 7px #888;
    box-shadow: 0px 0px 7px #888;
}

div.section div.paragraph {
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 1px;

    font-family: "Times New Roman", Serif;
}

div.news .item {
    margin-left: 10px;
    margin-right: 10px;
}

div.calendar {
    margin: -0.2em;
    padding: 0.2em;

    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;

    font-family: "Sans Serif", sans-serif;
    font-size: 85%;
}

div.calendar a.expander {
    color: black;
    outline: none;
    text-decoration: none;
}

div.calendar .details {
    display: none;
    visibility: hidden;
}

div.calendar p {
    margin-top: 0.4em;
    margin-left: 10px;
    margin-right: 10px;

    font-size: 100%;
    font-family: "Times New Roman", Serif;
}

div.calendar li {
    font-size: 100%;
    font-family: "Times New Roman", Serif;
}

img#feed {
    float: right;

    width: 12px;
    height: 12px;

    border: none;
    outline: none;
}

h1 {
    font-size: 100%;
    font-family: "Sans Serif", sans-serif;
    text-shadow: 2px 2px 5px #fff;

    -webkit-border-radius-topleft: 5px;
    -webkit-border-radius-topright: 5px;
    -moz-border-radius-topleft: 5px;
    -moz-border-radius-topright: 5px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;

    padding: 5px;
    margin: 0;
}

h2 {
    margin-bottom: -0.5em;
    font-family: "Sans Serif", sans-serif;
    font-size: 85%;
}

div.mugshot {
    float: left;
    width: 45%;

    margin-top: 20px;
    margin-bottom: 0px;
    margin-left: 10px;
    margin-right: 10px;
    padding: 7px;

    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;

    border-style: solid;
    border-color: gray;
    border-width: 1px;
}

img.mugshot {
    -webkit-box-shadow: 2px 2px 5px #888;
    -moz-box-shadow: 2px 2px 5px #888;
    box-shadow: 2px 2px 5px #888;
}

/* Use instead of p, when p isn't allowed */
div.p {
    margin-top: 16px;
    margin-bottom: 16px;
}

a.thumb, a.thumb:hover {
    color: black;
    text-decoration: none;
}

a.thumb div.thumb:hover {
    -webkit-box-shadow: 0px 0px 7px #888;
    -moz-box-shadow: 0px 0px 7px #888;
    box-shadow: 0px 0px 7px #888;
}

a.thumb div.thumb img {
    float: left;
    width: 75px;

    -webkit-box-shadow: 2px 2px 5px #888;
    -moz-box-shadow: 2px 2px 5px #888;
    box-shadow: 2px 2px 5px #888;

    border-style: none;
    margin-right: 10px;
}

div.gallery {
    position: fixed;

    top: 0;  /* Will be dynamically re-positioned */
    left: 0;

    display: none;
    visibility: hidden;

    /* Semi-transparent background */
    background-color: #fff;
    background-color: rgba(255, 255, 255, 0.8);

    border-style: solid;
    border-width: 1px;

    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;

    -webkit-box-shadow: 5px 5px 10px #888;
    -moz-box-shadow: 5px 5px 10px #888;
    box-shadow: 5px 5px 10px #888;

    padding: 20px;
    padding-bottom: 8px;
}

div.gallery b {
    font-family: "Sans Serif", sans-serif;
    font-size: 85%;
}

div.gallery a {
    outline: none;
}

div.gallery img.close {
    float: right;
    margin-bottom: 10px;
    margin-top: -10px;
    margin-right: -10px;
}

div.gallery img.gallery {
    border-style: solid;
    border-width: 1px;
    border-color: black;
}

div.gallery img.toolbar {
    width: 20px;
    height: 20px;
    border-style: none;
}

div.gallery img.prev {
    float: left;
    margin-top: 3px;
}

div.gallery img.next {
    float: left;
    margin-top: 3px;
}

div.gallery div.status {
    float: left;
    font-weight: bold;

    margin-top: 3px;
    padding-left: 10px;
    padding-right: 10px;
}

table.times {
    border-spacing: 0px;
}

table.times tr td {
    border-color: #ccc;
    border-width: 1px;
    border-bottom-style: solid;
}

table.times tr:first-child td {
    border-top-style: solid;
}

table.times tr td:first-child {
    border-left-style: solid;
    padding-left: 5px;
}

table.times tr td:last-child {
    border-right-style: solid;
    padding-right: 5px;
}

table.times tr:last-child td {
    border-bottom-style: solid;
}

table.times tr:first-child td:first-child {
    -webkit-border-top-left-radius: 3px;
    -moz-border-radius-topleft: 3px;
    border-top-left-radius: 3px;
}

table.times tr:first-child td:last-child {
    -webkit-border-top-right-radius: 3px;
    -moz-border-radius-topright: 3px;
    border-top-right-radius: 3px;
}

table.times tr:last-child td:first-child {
    -webkit-border-bottom-left-radius: 3px;
    -moz-border-radius-bottomleft: 3px;
    border-bottom-left-radius: 3px;
}

table.times tr:last-child td:last-child {
    -webkit-border-bottom-right-radius: 3px;
    -moz-border-radius-bottomright: 3px;
    border-bottom-right-radius: 3px;
}

table.times td {
    font-weight: bold;
    padding-right: 10px;
}

table.times td.desc {
    font-weight: normal;
    font-style: italic;
}

table.prices tr td {
    padding-right: 5px;
}

