/*
Theme Name: FoodsWith Main Theme
Author: Alex
Theme URI: foods.vitaminmineral.ru
Description: foods.vitaminmineral.ru theme
*/

body {
    margin: 0;
    text-align: left;
    font: normal 100%/1.6 Helvetica, Open Sans, Arial, sans-serif;
    background: #fff;
}

header {
    background: #006dbe;
}

h1, h2, h3, h4 {
    font-family: Trebuchet MS, Helvetica, Segoe UI, Verdana, Arial, sans-serif;
    text-align: center;
    color: #555;
    padding: 0 10px;
}

a {
    color: #006dbe;
}

a:hover {
    color: #009b2e;
    text-decoration: none;
}

em {
    font-weight: bold;
}

button:focus {outline:0;}

.header-content {
    margin: 0 auto;
    padding: 5px 0 10px;
    position: relative;
    max-width: 1024px;
    background: #006dbe;
}

.logo-cont {
    display: block;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 160px;
    height: 80px;
}

.logo-cont h1 {
    font-family: Helvetica, Segoe UI, Verdana, Arial, sans-serif;
    text-align: center;
    padding: 0;
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    color: #fff;
}

.logo {
    margin: 0;
    padding: 0;
    width: 160px;
    height: 80px;
}

.main-content {
    margin: 0 auto;
    padding: 10px;
    max-width: 1024px;
    background: #fff;
    position: relative;
    box-sizing: border-box;
}

.main-description, .how-to-use {
    font-family: Verdana, Helvetica, Segoe UI, Arial, sans-serif;
    max-width: 800px;
}

.how-to-use {
    list-style: none;
    padding-left: 20px;
}

.how-to-use li {
    position: relative;
    margin: 5px;
}

.how-to-use li::before {
    position: absolute;
    content: '\25CF';
    color: #006dbe;
    left: -20px;
    top: 0;
    padding: 0;
    margin: 0;
}

.step-description {
    font-size: 18px;
    margin-bottom: 10px;
}

footer {
    margin: 0 auto;
    max-width: 1024px;
    margin-top: 10px;
    padding: 5px;
    text-align: right;
    border-top: 1px solid #d8d8d8;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.foodswith-image, .feedback {
    display: block;
}

.foodswith-image {
    width: 200px;
    height: 125px;
    overflow: hidden;
}

.feedback {
    font-size: 14px;
    padding: 5px;
    margin: 15px;
}

.feedback a {
    text-decoration: none;
}

/* --- */

.fc-options-cont {
    position: relative;
    padding-right: 35px;
    width: 280px;
}

.fc-options-cont.option-loader::after, .fc-options-cont.option-loaded::after {
    position: absolute;
    display: block;
    width: 26px;
    height: 26px;
    right: 0px;
    top: 5px;
}

.fc-options-cont.option-loader::after {
    content: '';
    border: 3px dotted #006dbe;
    border-radius: 50%;
    display: block;
    box-sizing: border-box;
    animation: loader-rotation 1s linear infinite;
    overflow: hidden;
}

@keyframes loader-rotation {
    0% {transform: rotate(0deg);}
    100% {transform: rotate(360deg);}
} 

.fc-options-cont.option-loaded::after {
    content: '\2714';
    border-radius: 50%;
    background: #009b2e;
    color: #fff;
    font-weight: bold;
    text-align: center;
    line-height: 26px;
    font-size: 16px;
}

.food-category-options {
    font-size: 16px;
    padding: 5px;
    position: relative;
    width: 280px;
    height: 36px;
}

.nutrients-list-cont {
    text-align: center;
}

.vitamins-list, .minerals-list {
    display: inline-block;
    vertical-align: top;
    margin: 5px 0px;
}

.list-column {
    padding: 0;
    list-style: none;
    display: inline-block;
    width: 135px;
    margin: 0 10px;
    text-align: center;
}

.nutrients-list-item {
    display: inline-block;
    border-radius: 10px;
    box-sizing: border-box;
    position: relative;
    margin: 0;
    background: #fff;
    margin: 8px 0px;
}

.nutrient-button {
    display: block;
    border: 1px solid #d8d8d8;
    padding: 5px;
    box-sizing: border-box;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    box-shadow: 0px 0px 8px #ccc;
    position: relative;
    font-weight: bold;
    color: #555;
    text-align: left;
    transition: all 0.1s;
    width: 135px;
    height: 36px;
    padding-left: 36px;
}

.nutrient-button::before {
    content: '';
    display: block;
    position: absolute;
    width: 18px;
    height: 18px;
    left: 8px;
    top: 8px;
    border-radius: 5px;
    box-sizing: border-box;
    box-shadow: 0px 0px 3px #ccc inset;
    border: 1px solid #d8d8d8;
}

.nutrient-button.checked, .nutrient-button.checked-green, .nutrient-button.checked-red {
    box-shadow: none;
    position: relative;
    border: none;
}

.nutrient-button.checked-green {
    background: #009b2e;
    color: #fff;
}

.nutrient-button.checked-red {
    background: #bf0000;    
    color: #fff;
}

.checked::before, .checked-green::before, .checked-red::before {
    position: absolute;
    display: block;
    box-shadow: none;
    border: none;
}

.checked::before {
    width: 26px;
    height: 26px;
    left: 5px;
    top: 5px;
    border: 3px dotted #006dbe;
    border-radius: 50%;
    box-sizing: border-box;
    animation: loader-rotation 1s linear infinite;
    overflow: hidden;
}

.checked-green::before, .checked-red::before {
    background: #fff;
    width: 20px;
    height: 20px;
    left: 8px;
    top: 8px;
    line-height: 20px;
    text-align: center;
}

.checked-green::before {
    content: '\2714';
    color: #009b2e;
    font-size: 16px;
}

.checked-red::before {
    content: '\2716';
    color: #bf0000;
    font-size: 20px;
}

.find-foods-button-cont {
    position: fixed;
    bottom: -60px;
    height: 0;
    background: rgba(255,255,255,0.95);
    width: 100%;
    left: 0;
    transition: all 0.15s;
}

.find-foods-button-cont.button-on, .find-foods-button-cont.button-off {
    visibility: visible;
    opacity: 1;
    bottom: 0px;
    height: 56px;
    z-index: 10;
    box-shadow: 0px -1px 0px 1px #ccc;
}

.find-foods-button {
    display: block;
    position: relative;
    color: #fff;
    font-size: 16px;
    border-radius: 5px;
    background: #006dbe;
    border: none;
    box-shadow: 0px 0px 8px #ccc;
    height: 36px;
    padding: 5px 36px;
    margin: 10px auto;
}

.button-loader {
    background: #0f7bcc;
}

.button-loader::before {
    content: '';
    display: block;
    position: absolute;
    width: 10px;
    height: 3px;
    bottom: 0;
    left: 50%; 
    animation: loader-line 0.2s linear infinite;
    background: #fff;
    border-radius: 2px;
}

@keyframes loader-line {
    0% {width: 10px; margin-left: -5px;}
   100% {width: 150px; margin-left: -75px;}
} 

.button-off .find-foods-button {
    display: none;
}

.no-matches {
    background: #bf0000;
    width: 95%;
    color: #fff;
    padding: 5px;
    border-radius: 8px;
    text-align: center;
    margin: 5px auto 0;
    animation: message-shake;
    animation-duration: 200ms;
    animation-iteration-count: 2;
    line-height: 1.4;
    font-size: 14px;
    overflow: auto;
    max-width: 600px;

}

@keyframes message-shake {
    0% {transform: translateX(0);}
    25% {transform: translateX(8px);}
    75% {transform: translateX(-8px);}
    100% {transform: translateX(0);}
}

.foods-list-output {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
}

.foods-list-output.filled {
    visibility: visible;
    opacity: 1;
    margin: 10px auto;
    padding: 5px 0;
}

.foods-list-header {
    font-size: 20px;
    line-height: 1.4;
    margin: 15px 0px;
}

.data-source {
    text-align: right;
    font-style: italic;
    margin: 8px 5px;
    font-size: 14px;
}

.data-source a {
    text-decoration: none;
}

.foods-list {
    padding: 0;
    margin: 5px 0;
    list-style: none;
    border-radius: 8px;    
}

.fl-a, .fl-r {
    counter-reset: number;
}

.foods-list-item {
    border-radius: 8px;
    margin: 5px auto;
    margin-bottom: 15px;
    background: #fff;
    border: 2px solid #009b2e;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    min-width: 300px;
}

.fl-b .foods-list-item {
    border: 2px solid #ffdd0b;
}

.food-name {
    position: relative;
    font-family: Verdana, Helvetica, Segoe UI, Arial, sans-serif;
    font-size: 18px;
    padding: 5px 10px;
    line-height: 25px;
    color: #000;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.fl-r .food-name {
    padding-left: 35px;
    font-size: 16px;
}

.fl-b .food-name {
    padding-left: 10px;
    background: #ffdd0b;
}

.fl-a .food-name {
    background: #009b2e;
    color: #fff;
}

.fl-r .food-name::before {
    content: counter(number);
    counter-increment: number 1;
    position: absolute;
    background: #009b2e;
    top: 5px;
    left: 5px;
    width: 25px;
    height: 25px;
    color: #fff;
    text-align: center;
    line-height: 20px;
    font-size: 14px;
    border-radius: 5px;
    line-height: 25px;
}

.food-content {
    padding-left: 10px;
    margin: 5px 0;
    list-style: none;
}

.food-content-nutrient {
    margin: 5px 0;
}

.food-nutrient-name {
    font-weight: bold;
}

.food-nutrient-percent {
    background: #006dbe;
    padding: 3px 5px;
    border-radius: 8px;
    color: #fff;
    margin-left: 5px;
    white-space: nowrap;
    font-size: 14px;
}

.output-next-button {
    display: block;
    color: #fff;
    font-size: 16px;
    border-radius: 8px;
    background: #009b2e;
    border: none;
    box-shadow: 0px 0px 8px #ccc;
    font-weight: bold;
    margin: 10px auto;
    padding: 10px 15px;
}

.next-button-counter {
    font-size: 14px;
    font-weight: normal;
}

@media screen and (min-width: 680px) {

    .nutrients-list-cont {
        text-align: left;
    }

    .fl-b, .fl-a {
        display: flex;
        align-items: stretch;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .fl-b .foods-list-item, .fl-a .foods-list-item {
        flex: 45%;
        margin: 8px;
    }
}

@media screen and (min-width: 1200px) {
    
    .logo-cont {
        margin: 0;
    }

    .main-content {
        padding: 10px 15px;
    }
}