/*
    These styles compliment the wiki styles when the page is a zone landing page or is simply in the zone.
*/

@import 'includes/vars';
@import 'includes/mixins';
@import 'includes/grid';

$blue-background-text-color = #fff;

/* Settings which apply to _all_ zone pages */
.zone {
    create-gradient-background(#00539f, true);
    use-white-logo();
    remove-main-spacing();
    override-main-nav-color($blue-background-text-color);

    #main-header {
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }

    .user-state {
        a, a:hover, a:focus, a:visited, > {$selector-icon} {
            color: $blue-background-text-color;
        }
    }

    /*  Change open auth text in white */
    .oauth-login-options {
        color: $blue-background-text-color;
    }

    /* zone content area needs to be adjusted for zone pages */
    main {
        background: transparent;
    }

    .wiki-main-content {
        padding-top: $first-content-top-padding !important;

        .center {
            add-center-spacing();
        }
    }
}

/* zone landing pages only */
.zone-landing {

    h1 {
        @extend $column-6;
        color: $blue-background-text-color;
        clear: both;
    }

    .zone-landing-header-preview {
        color: $blue-background-text-color;
        margin-top: $grid-spacing;

        .column-strip {
            position: relative;

            .zone-landing-header-preview-base {
                position: absolute;
                width: 100%;
                z-index: 2;
            }

            .zone-landing-header-spacing {
                float: left;
            }
        }
    }

    .crumbs {
        color: $blue-background-text-color;

        a {
            old-ie(color, $blue-background-text-color);
            color: rgba(255, 255, 255, 0.7);
        }
    }

    .summary {
        display: none;
    }

    h3.title {
        set-font-size($base-font-size);
        margin: 6px 0 0 0;
    }
}

/* the zone landing page masthead    */
.zone-landing-header {
    position: relative;

    > .center {
        padding-top: $first-content-top-padding;
    }

    .masthead-text {
        p {
            set-larger-font-size();
            font-weight: $light-font-weight;
        }
    }

    .zone-image {
        bidi-style(right, 0, left, auto);
        position: absolute;
        top: 100px;
        display: block;
        width: 468px;
        bottom: 0;
        background-repeat: no-repeat;
        background-position: 95% 0;
    }

    a.button, button {
        color: $blue-background-text-color;
        &:not(.transparent) {
            old-ie(background-color, #0095dd); /* old ie */
            background-color: rgba(0, 0, 0, 0.1);
            vendorize(box-shadow, inset 0 -1px rgba(0, 0, 0, .1));
        }
    }
}

.zone-landing-lists li {
    padding: $list-item-spacing 0;
    prevent-last-child-spacing(padding-bottom);
}



/*    Basic zone article pages */
.zone-article-header {
    padding: $grid-spacing 0;
    overflow: hidden;

    .zone-title {
        heading-2();

        a {
            font-family: $heading-font-family;
            color: $blue-background-text-color;
        }
    }

    .zone-image {
        bidi-style(right, 0, left, auto);
        position: absolute;
        top: 0;
        display: block;
        width: 200px;
        height: 400px;
        background-size: contain;
        background-repeat: no-repeat;
    }
}

.zone-content {
    padding-top: 38px;
    reverse-link-decoration()
}

.zone-subnav-container {
    background: #fff;
    margin-bottom: $grid-spacing;
    position: relative;
    z-index: 10;
}

.zone-callout {
    position: relative;
    padding: $grid-spacing;
    background: #f4f7f8;
    margin: ($grid-spacing + ($grid-spacing / 2)) 0;

    table {
        width: 100%;
    }
    td {
        vertical-align: bottom;
        padding-right: $grid-spacing;
    }
}


/* Styles specific to the Connect page (formerly the Developer Program page),
   because it's a specific zone */
.dev-program-block {
    margin-bottom: ($grid-spacing * 2);
    prevent-last-child-spacing('*', margin-bottom);

    ul {
        margin-bottom: 0;
    }
}

.dev-program-first {
    margin-top: -($grid-spacing * 4);
}

$dev-program-pad {
    background: $light-background-color;
    padding: ($grid-spacing);
    prevent-last-child-spacing(p, margin-bottom);
}

.dev-program-callouts {
    margin-left: $grid-margin;
    margin-right: $grid-margin;

    .dev-program-callout {
        @extend $dev-program-pad;

        h2 {
            set-larger-font-size();
        }
    }
}

.stack-form {
    margin-bottom: $content-block-margin;

    input {
        display: inline-block;
        width: 90%;
    }

    .stack-icon {
        width: 16px;
        height: 16px;
        display: inline-block;
        background-image: url($media-url-dir + 'stackoverflow.png');
        margin-right: $icon-margin;
    }
}

.dev-program-explanation {
    @extend $dev-program-pad;
}

.dev-program-hacks {
    h3 {
        set-larger-font-size();
        margin-bottom: 4px;
    }

    p {
        color: #bbb;
        set-smaller-font-size();
        margin-bottom: 10px;

        a {
            color: #777;
        }
    }
}

.dev-program-events {
    table.dev-program-table {
        width: 100%;
        border: 0;

        td {
            width: 33%;
            border: 0;
        }
    }
}

@media $media-query-tablet {
    .zone-landing {
        .zone-subnav-container {
            margin-top: 0;
        }

        .zone-landing-header-preview .column-strip, .zone-landing-header-preview .masthead-text {
            width: get-grid-dimension($media-query-tablet, 6);

            .zone-landing-header-preview-base {
                position: static;
            }
        }
    }

    .zone-landing-header .zone-image, .zone-article-header .zone-image {
        opacity: 0.2;
    }
}

@media $media-query-mobile {
    .zone-landing-header .zone-image, .zone-article-header .zone-image {
        display: none;
    }

    .zone-landing h1 {
        width: auto;
    }

    .zone-landing-header {
        display: block;
    }
}
