/*
 * CSS Day
 * A whole day about this stuff:
 */

body {
    font: 100% Source Code Pro, Inconsolata, Menlo, monospace;
    background-color: white;
    color: #222;
    }

header {
    background-color: #e3e2db;
    padding: 0 1em;
    text-align: center;
    }

/* Logo */
header h1 {
    width: 100%;
    height: 4em;
    background: transparent url('img/cssday-logo.png') center .9em no-repeat;
    background-size: 5em;
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    }

/* divisions */
#content,
footer {
    padding: 1px 1em;
    }

nav,
footer,
#spotlight {
    background-color: #333;
    color: white;
    }

/* Headings */
h1,h2,h3 {
    color: steelblue;
    font-weight: normal;
    }
h1::before,
h2::before,
h3::before {
    content: '/* ';
    }
h1::after,
h2::after,
h3::after {
    content: ' */';
    }

/* footer */
footer { text-align: center; }
footer h1 { font-size: 1em; }
footer ul {
    list-style: none;
    padding-left: 0;
    }
footer li {
    margin-bottom: 2em;
    }
footer a:hover {
    background-color: transparent;
    }

/* Links */
a { text-decoration: none; }

a:link,
.info { color: red; }

a:visited { color: darkred; }
nav a:visited { color: white; }
input[type="submit"]:hover,
a:hover,
a:active {
    background-color: red;
    color: white;
    -webkit-transition-property: background-color, border;
    -webkit-transition-duration: .5s;
    -webkit-transition-timing-function: ease;
    -moz-transition-property: background-color, border;
    -moz-transition-duration: .5s;
    -moz-transition-timing-function: ease;
    -ms-transition-property: background-color, border;
    -ms-transition-duration: .5s;
    -ms-transition-timing-function: ease;
    -o-transition-property: background-color, border;
    -o-transition-duration: .5s;
    -o-transition-timing-function: ease;
    transition-property: background-color, border;
    transition-duration: .5s;
    transition-timing-function: ease;
    }

input[type="submit"],
nav a,
#spotlight a {
    color: white;
    }

/* Date */
.date {
    color: #222;
    font-size: xx-large;
    margin: 0 .4em;
    }

/* Purchase link */
.purchase,
input[type="submit"] {
    background-color: red;
    }
    .purchase a {
        display: block;
        padding: .2em 1em 1em;
        color: white;
        }
    .purchase a:hover,
    input[type="submit"]:hover {
        background-color: #222;
        }

/* Menus */
.speakers ul,
#spotlight,
nav ul {
    list-style: none;
    padding-left: 0;
    }

/* Navigation */
nav li {
    text-align: center;
    border-bottom: 1px solid #444;
    }
nav a {
    display: block;
    }
    nav a:link {
        color: white;
        }

/* List of speakers */
.speakers ul::before { 
    content: '#speakers {'; 
    font-weight: bold;
    }
.speakers ul::after { 
    content: '}'; 
    font-weight: bold;
    }
.speakers li { padding-left: 2em; }

/* Put a couple of links in the spotlight on small screens */
#spotlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    overflow: hidden;
    }
    #spotlight li {
        float: left;
        width: 50%;
        border-left: 1px solid #e3e2db;
        }
    #spotlight li:first-child {
        border-left: none;
        margin-left: -1px;
        }
    #spotlight a,
    nav a {
        display: block;
        padding: .5em 0;
        }

/* Contact form */
fieldset:before {
    content: '/*** contact form ***/';
    }
fieldset:after {
    content: '/*** end contact form ***/';
    }
fieldset {
    padding: .5em 1em;
    background-color: #e3e2db;
    border: none;
    }
label, input { display: block; }
textarea { 
    width: 100%; 
    resize: vertical;
    }
.img + p {
    margin-top: 0;
    font-size:x-small;
    }
.img img {
    max-width: 100%;
    }
input[type="submit"] {
    border: none;
    }

/* Table fun */
th, td {
    padding-left: .5em;
    padding-right: .5em;
    }
th { text-align: left; }
tr:nth-child(2n+2) {
    background-color: #e3e2db;
    }
#attendees tr>td.header {
    background-color: #222;
    color: white;
    }
thead.scripted th {
    cursor:pointer;
    }
#attendees {
    font-size: small;
    width: 100%;
    }
caption {
    margin-bottom: 1em;
    }
@media only screen and (max-width: 30em) {
    #attendees thead {
        position: absolute;
        top: -9999px;
        }
    #attendees thead.scripted {
        position:static;
        }
    #attendees thead tr {
        background-color: #e3e2db;
        }
    #attendees thead.scripted tr:before {
        content: 'Sort by:';
        margin: 0 0 .5em .5em;
        }
    thead.scripted tr>td.header {
        position: static;
        }
    #attendees tbody tr {
        position: relative;
        margin-top: .75em;
        margin-bottom: .75em; 
        border-bottom: 1px solid #e3e2db;
        background-color: white;
        padding: .2em .2em 1em;
        }
    #attendees tr, 
    #attendees td { 
        display:block; 
        }
    #attendees tr>td:first-child {
        font-weight: bold;
        }
    #attendees tr>td:last-child {
        position: absolute;
        top: 0;
        right: 0;
        color: #C0B8B4;
        }
    #attendees tr>td.header {
        position: static;
        color: white;
        }
}

/* Ladies and gentlemen, I give the you the first breakpoint */
@media only screen and (min-width: 44em) {
    /* This is so small that I feel no guilt about hiding it. */
    #spotlight { display: none; }

    #page {
        border-right: 1em solid red;
        }

    /* Navigation */
    nav {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        }
        nav ul {
            margin-bottom: 0;
            padding-left: 1em;
            }
            nav li {
                display: inline-block;
                text-align: left;
                border-bottom: none;
                }
            nav a.current,
            nav a:hover {
                border-bottom: .5em solid red;
                background-color: transparent;
                }
    /* Header */
    header {
        position: relative;
        height: 17em;
        padding: 0;
        min-height: 17em;
        text-align: left;
        }
        header h1,
        .info {
            position: absolute;
            width: 50%;
            }
        header h1 {
            bottom: -1em;
            height: 7em;
            margin: 0;
            background-size: 7em;
            background-position: 50% 1.3em;
            border-bottom: 1em solid #222;
            }
        .info {
            right: 0;
            bottom: 0;
            }
        .date {
            margin: 0;
            }
        .purchase {
            margin-bottom: 0;
            }
    #content {
        padding: 2em 10%;
        }
    footer { text-align: left; }
    footer li {
        display: inline-block;
        margin-left: 2em;
        vertical-align: middle;
        }
    /* Form */
    form p { 
        display: table;
        margin: 1em 0;
        }
    label, input { display: table-cell; }
    label {
        width: 10em;
        text-align: right;
        padding-right: 1em;
        }
    input[type="submit"] { 
        display: block;
        margin-left: 11em; 
        }
}

@media only screen and (min-width: 54em) {
    #page {
        border-width: 1.5em;
        }
    /* There's gold in them thar hills. */
    header h1 {
        width: 38.2%;
        }
    .info {
        width: 61.8%;
        }
    .home #content {
        position: relative;
        padding-left: 40%;
        background: transparent url('img/curly.png') 32% 4em no-repeat;
        }
    article {
        margin-left: 36%;
        }
    .home article {
        margin-left: 0;
        }
    .purchase {
        display: inline-block;
        }
    /* Speakers */
    #tab { background: red url('/_img/2013/speakers/tab.jpg') -84px -62px no-repeat; }
    #eric { background: red url('/_img/2013/speakers/eric.jpg') -117px -56px no-repeat; }
    #lea { background: red url('/_img/2013/speakers/lea.jpg') -76px -54px no-repeat; }
    #steve { background: red url('/_img/2013/speakers/stephen.jpg') -43px -65px no-repeat; }
    #daniel { background: red url('/_img/2013/speakers/daniel.jpg') -94px -72px no-repeat; }
    #bert { background: red url('/_img/2013/speakers/bert.jpg') -45px -57px no-repeat; }
    #divya { background: red url('/_img/2013/speakers/divya.jpg') -77px -61px no-repeat; }
    #peter { background: red url('/_img/2013/speakers/peter.jpg') -58px -75px no-repeat; }
    .pos-1, .pos-2, .pos-3, .pos-4, .pos-5, .pos-6, .pos-7, .pos-8 {
        position: absolute;
        top: 0;
        left: 0;
        width: 3em;
        height: 2em;
        background-color: red;
        border-radius: .4em;
        box-shadow: 0px 0px 0px 0px rgba(9,27,40,0.2);
        -webkit-transition-property: width, height, background-position, margin, box-shadow, z-index;
        -webkit-transition-duration: 1s;
        -webkit-transition-timing-function: ease;
        -moz-transition-property: width, height, background-position, margin, box-shadow, z-index;
        -moz-transition-duration: 1s;
        -moz-transition-timing-function: ease;
        -ms-transition-property: width, height, background-position, margin, box-shadow, z-index;
        -ms-transition-duration: 1s;
        -ms-transition-timing-function: ease;
        -o-transition-property: width, height, background-position, margin, box-shadow, z-index;
        -o-transition-duration: 1s;
        -o-transition-timing-function: ease;
        transition-property: width, height, background-position, margin, box-shadow, z-index;
        transition-duration: 1s;
        transition-timing-function: ease;
        }
    .speakers a:hover span {
        width: 200px;
        height: 200px;
        background-position: 0 0 !important;
        margin-top: -75px;
        margin-left: -75px;
        z-index:10;
        box-shadow: 80px 100px 20px -40px rgba(9,27,40,0.2);
        }
    .pos-1, .pos-2, .pos-3, .pos-4 { left: 10%; }
    .pos-5, .pos-6, .pos-7, .pos-8 { left: 18%; }
    .pos-1, .pos-5 { top: 7em; }
    .pos-2, .pos-6 { top: 10em; }
    .pos-3, .pos-7 { top: 13em; }
    .pos-4, .pos-8 { top: 16em; }
}

@media screen and (min-width: 72em) {
    body {
        font-size: 112.5%;
        }
    .home #content {
        background-position: 34% 3em;
        }
    .pos-1, .pos-2, .pos-3, .pos-4 { top: 8.5em; }
    .pos-5, .pos-6, .pos-7, .pos-8 { top: 11.5em; }
    .pos-1, .pos-5 { left: 6%; }
    .pos-2, .pos-6 { left: 12%; }
    .pos-3, .pos-7 { left: 18%; }
    .pos-4, .pos-8 { left: 24%; }
}

@media screen and (min-width: 80em) {
    body {
        font-size: 125%;
        background-color: dimgray;
        }
    #page {
        margin: 0 auto;
        max-width: 80em;
        background-color: white;
        }
}

@media screen and (min-width: 90em) {
    nav { text-align: center; }
        nav ul { padding-left: 0; }
}

/* TODO: Print styles */
