/**********************************************************************************

    Project Name : WhoNews
    File Name    : whonews.css
    Author       : Alan G. Wagner
    Author Email : mail@alanwagner.org
    Copyright    : 2020 Alan G. Wagner
    License      : GNU GPL 3.0

**********************************************************************************/
@CHARSET "UTF-8";

:root {
    --top-header-text-color: #fffffc;
    --top-header-bg-color: #101010;
    --top-header-height: 7rem;
    --top-header-border-height: 7px;

    --sub-header-bg-color: #208000;
    --sub-header-height: 9px;

    --tab-row-height: 6rem;

    --settings-panel-width: 40rem;

    --links-bg-color: #fffffc;

    --about-panel-width: 48rem;
    --about-panel-height: 49.5rem;
}





/*****   BASE LAYOUT   *****/


html, body {
    position: relative;
    height: 100%;
}


.wn-tablet-outer {
    position: relative;
    min-width: 720px;
    height: 100%;
    margin: 0;
    border: 2px solid #444;
    overflow: hidden;
}

.wn-tablet-inner {
/*  MUST NOT HAVE POSITION, FOR TAB PLACEMENT TO WORK  */
/*    position: relative;  */
    height: calc(100% - var(--top-header-height) - var(--sub-header-height) );
    background-color: var(--links-bg-color);

    /*  Sync scroll  */
    overflow-y: scroll;
}





/*****   TOP HEADER   *****/


.wn-top-header {
    position: relative;
    background-color: var(--top-header-bg-color);
    color: var(--top-header-text-color);
    padding: 5px 12px 0;
    height: var(--top-header-height);
    border-top: var(--top-header-border-height) solid var(--sub-header-bg-color);
    z-index: 2000;
}

h1.wn-header-title {
    position: absolute;
    top: 11px;
    left: 12px;
    height: 4.2rem;
    width: 23rem;
    margin: 0;
    padding: 0;
    background-image: linear-gradient(#ffffb0, gold);
}

.wn-header-title-img {
    display: block;
    width: 100%;
    height: 100%;
    background-image: url(../img/WhoNews_Transparent.png);
    background-size: cover;
}

.wn-header-title-text {
    display: none;
}


.wn-keywords {
	position: relative;
	float: right;
	margin-right: calc( var(--top-header-height) * 0.96);
        margin-top: 2.1rem;
	font-size: 155%;
	color: #eee;
	text-align: right;
}

.wn-keywords-label {
	color: #bbb;
}


#wn-about-btn {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    top: 0;
    left: 26.3rem;
    padding: 0 1.7rem 4px;
    height: calc(var(--top-header-height) - var(--top-header-border-height));
    width: auto;
    border-top: 1px solid var(--top-header-bg-color);
    border-bottom: 1px solid var(--top-header-bg-color);
    cursor: pointer;
    color: #ccc;
    font-variant: small-caps;
    font-size: 170%;
}

#wn-about-btn.wn-about-btn-active {
    background-color: #313131;
    color: #ddd;
}

@media (hover:hover) {
    #wn-about-btn:hover {
        background-color: #313131;
        color: #ddd;
    }
}


#wn-settings-btn {
    position: absolute;
    display: block;
    top: 0;
    right: 1px;
    height: calc(var(--top-header-height) - var(--top-header-border-height));
    width: var(--top-header-height);
    background-image: url(gears-icon-white.png);
    background-size: 76%;
    background-position: 60% 54%;
    background-repeat: no-repeat;
    border-top: 1px solid var(--top-header-bg-color);
    border-bottom: 1px solid var(--top-header-bg-color);
    cursor: pointer;
}

#wn-settings-btn  a {
    display: none;
}

.wn-settings-btn-active {
    background-color: #313131;
}

@media (hover:hover) {
    #wn-settings-btn:hover {
        background-color: #313131;
    }
}




/*****   SUB-HEADER BAR   *****/


.wn-sub-header {
    position: relative;
    display: block;
    background-color: var(--sub-header-bg-color);
    height: var(--sub-header-height);
    padding: 0;
    border-bottom: 2px solid #004400;
}





/*****   COLUMNS   *****/


.wn-col-border {
    border-right: 3px solid #444;
    border-left: 3px solid #444;
}

.wn-col-border.wn-col-left {
    border-left-width: 1px;
}

.wn-col-border.wn-col-right {
    border-right-width: 1px;
}


.wn-col {
    width: 100%;
}

.wn-cols-2  .wn-col {
    width: 50%;
}

.wn-cols-3  .wn-col {
    width: 33.33333%;
}

.wn-cols-4  .wn-col {
    width: 25%;
}

.wn-cols-5  .wn-col {
    width: 20%;
}





/*****   TABS   *****/

.wn-tabs {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 100;
	width: 100%;
    height: var(--tab-row-height);
    background-color: var(--links-bg-color);
}


.wn-tab {
    position: relative;
    float: left;
    height: var(--tab-row-height);
    border-bottom: 3px solid gray;
    margin: 0;
    padding: 0 20px;
}

.wn-tab  .wn-tab-text {
    position: relative;
    height: 100%;
    width: 100%;
    background-color: var(--links-bg-color);
    padding: 10px 0;
    margin: 0;
    text-align: center;
    font-weight: 600;
    font-size: 150%;
    line-height: 2rem;
}

.wn-tab  .wn-tab-image {
	position: relative;
    height: 100%;
    width: 100%;
    background-color: var(--links-bg-color);
    padding: 7px 0;
    margin: 0;
}

.wn-tab  .wn-tab-image  span.wn-img-bg {
    display: block;
    position: relative;
    height: 100%;
    width: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}


.wn-tab  ul {
/*  MUST NOT HAVE POSITION, FOR RSS LINK PLACEMENT  */
/*    position: relative;  */
    list-style: none;
    padding: 0;
    margin: 0;
    height: 0;
    line-height: 0;
}

.wn-tab  ul  li {
/*  MUST NOT HAVE POSITION, FOR RSS LINK PLACEMENT  */
/*    position: relative;  */
    padding: 0;
    margin: 0;
    height: 0;
    line-height: 0;
}


.wn-tab  a.wn-link-rss {
    display: block;
    position: absolute;
    left: 3px;
    bottom: 3px;
    height: 12px;
    width: 12px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    background-image: url(rss.png);
}

.wn-tab  a.wn-link-rss:hover {
    background-position: center bottom;
}

.wn-tab  .wn-tab-image  span,
.wn-tab  .wn-link-rss  span,
.wn-tab  .wn-column-anchor {
    display: none;
}





/*****   ITEMS LIST   *****/


.wn-links-wrapper {
    position: relative;
    float: left;
    padding: 0;
    min-height: 10px;

    /*  sync scroll  */
    height: auto;
}


.wn-links-wrapper  ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wn-column-title {
	display: none;
}


/**  ITEM BLOCK  **/


.wn-item {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    padding: 15px 33px;
    border-bottom: 1px solid #444;
    text-decoration: none;
    color: #111;
    cursor: pointer;
}

.wn-item:hover,
.wn-item:active {
    background-color: #f8ffff;
}

.wn-item-image {
    position: relative;
    display: block;
    height: auto;
    border: 1px solid #aaa;
    margin-top: 5px;

    width: 35%;
    margin-bottom: 0.5rem;
    float: left;
    margin-right: 1.5rem;
}

.wn-item-image  img {
    position: relative;
    width: 100%;
    height: auto;
}

.wn-item-text {
/*  MUST NOT HAVE POSITION, FOR LINK TO COVER BLOCK  */
/*    position: relative;  */
    display: block;
    width: 100%;
    height: auto;
}

.wn-item-title {
/*  MUST NOT HAVE POSITION, FOR LINK TO COVER BLOCK  */
/*    position: relative;  */
    display: block;
    width: 100%;
    height: auto;

    font-size: 175%;
    line-height: 125%;
    font-weight: 500;
}

.wn-item-title  a,
.wn-item-title  a:hover,
.wn-item-title  a:active {
    text-decoration: none;
    color: #111;
}

.wn-item-title  a:before {
    content:'';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
}

.wn-item-date {
    position: relative;
    display: block;
    clear: left;
    width: 100%;
    height: 2.5rem;
    overflow: hidden;

    padding-top: 5px;
    font-size: 100%;
    color: #585858;
}

.wn-item-description {
    position: relative;
    display: none;
    clear: left;
    width: 100%;
    height: auto;

    padding-top: 5px;
    font-size: 100%;
}





/*****   SETTINGS FORM   *****/


#wn-settings-anchor {
    position: absolute;
    top: 0px;
    right: 0px;
    display: none;
}

#wn-settings-panel {
    position: absolute;
    top: var(--top-header-height);
    right: 0px;
    z-index: 1000;
    background-color: #eee;
    border: 1px solid #999;
    border-top-width: 0;
    box-shadow: -3px 4px 10px 1px #c0c0c0;
    width: var(--settings-panel-width);
    height: auto;
    max-height: calc(100% - var(--top-header-height) - var(--sub-header-height) );
    overflow-y: scroll;
    transition: right 0.5s;
}

#wn-settings-form {
    position: relative;
    margin: 20px 30px;
}

#wn-settings-form  h3 {
    font-size: 125%;
    text-align: center;
}

.wn-settings-row {
    padding-top: 1rem;
}

.wn-settings-row  label  span.label_wide {
    display: inline-block;
    width: 100px;
}


.wn-input-custom {
    display: block;
    margin-bottom: 5px;
    padding-left: 2.2rem;
    overflow: hidden;
    height: 4rem;
    transition: height 0.3s;
}

.wn-input-custom  span {
    position: relative;
    display: block;
    padding-top: 10px;
}

.wn-input-custom  input {
    width: 22rem;
}

#wn-settings-submit-btn {
    margin-top: 0.6rem;
    width: 60%;
}


/**  INTERACTIVE EFFECTS  **/


#wn-settings-panel.wn-settings-hidden {
    /*  Leave a margin to hide the drop shadow  */
    right: calc(-3rem - var(--settings-panel-width));
}

.wn-input-custom.wn-custom-hidden  {
    height: 0;
}




#wn-about-panel {
    position: absolute;
    top: var(--top-header-height);
    left: 0px;
    z-index: 1000;
    background-color: #eee;
    border: 1px solid #999;
    border-top-width: 0;
    box-shadow: 2px 4px 10px 1px #c0c0c0;
    width: var(--about-panel-width);
    height: var(--about-panel-height);
    padding-top: 1.1rem;
    transition: top 0.5s;
}


#wn-about-panel.wn-about-hidden {
    /*  Leave a margin to hide the drop shadow  */
    top: calc(-3rem - var(--about-panel-height));
}

#wn-about-panel  p {
    padding: 0.7rem 2.5rem 0;
    font-size: 135%;
}



/*****   DISPLAY SETTINGS   *****/


.wn-scroll-free  .wn-tablet-inner {
    overflow-y: hidden;
}

.wn-scroll-free  .wn-links-wrapper {
    height: calc( 100% - var(--tab-row-height) );
    overflow-y: scroll;
}

.wn-images-large  .wn-item-image {
    width: 100%;
    float: none;
    margin-bottom: 1rem;
    margin-right: 0;
}

/**  This case is technically superfluous, since the image tags themselves won't be created  **/
.wn-images-hide  .wn-item-image {
    display: none;
}

.wn-description-full  .wn-item-description,
.wn-description-short  .wn-item-description {
    display: block;
}


