* {
    box-sizing: border-box;
}

html {
    font-size: 12px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    padding: 0;
    margin: 0;
    font-family: 'Quicksand', Arial, sans-serif;
    line-height: 1.5;
    background-color: #06566c;
}

a {
    color: #0693ba;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    padding: 0 0 0 1rem;
}

li {
    padding: 0.3rem 0;
}

button, input, select {
    font-family: 'Quicksand', Arial, sans-serif;
}

hr {
    margin: 2rem 0 0.5rem;
    border-top: 1px solid #fff;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

nav ul, .items {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

header {
    height: 9.5rem;
    padding: 1rem;
    margin: 0;
    background: linear-gradient(45deg, #044b5f, #1697bb);
    z-index: 1;
}

header img {
    width: 2rem;
    height: 2rem;
}

header h1 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: #fff;
}

@media (min-width: 512px) {
    header img {
        width: 3rem;
        height: 3rem;
    }

    header h1 {
        font-size: 2rem;
    }
}

header h1 * {
    display: inline-block;
    vertical-align: middle;
    color: #fff;
    text-decoration: none !important;
}

header nav {
    position: absolute;
    right: 1rem;
    top: 0.6rem;
    font-size: 1.3rem;
    color: #fff;
}

header nav li {
    display: inline-block;
    margin: 0.5rem 0.2rem 1rem;
    cursor: pointer;
}

@media (min-width: 512px) {
    header nav {
        top: 1rem;
        font-size: 1.7rem;        
    }
}

.search-bar {
    display: flex;
    width: 100%;    
}

.search-bar input, .search-bar select {
    font-size: 1.2rem;
    border: none;
    background-color: #ffffff4d;
    outline: none;
    border-radius: 5px;
}

.search-bar input {
    flex: 1;
    padding: 0.8rem;
    margin-right: 0.7rem;
    transition: background 0.3s ease;
}

.search-bar input:focus {
    background-color: #ffffff7f;
}

.search-bar input::placeholder {
    color: #ffffffc0;
}

.search-bar select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: #fff;
    padding-left: 1rem;
    background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0'%3F%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 491.996 491.996'%3E%3Cpath d='M484.132,124.986l-16.116-16.228c-5.072-5.068-11.82-7.86-19.032-7.86c-7.208,0-13.964,2.792-19.036,7.86l-183.84,183.848 L62.056,108.554c-5.064-5.068-11.82-7.856-19.028-7.856s-13.968,2.788-19.036,7.856l-16.12,16.128 c-10.496,10.488-10.496,27.572,0,38.06l219.136,219.924c5.064,5.064,11.812,8.632,19.084,8.632h0.084 c7.212,0,13.96-3.572,19.024-8.632l218.932-219.328c5.072-5.064,7.856-12.016,7.864-19.224 C491.996,136.902,489.204,130.046,484.132,124.986z' fill='%23fff'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.search-bar select option {
    color: #044b5f;
}

main {
    flex: 1;
    background-color: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.items.is-listing-seller-items li article {
    margin-bottom: 2.8rem;
}

.items.is-listing-seller-items .price {
    bottom: 1.3rem;
}

.items .buyer {
    position: absolute;
    bottom: 0.3rem;
    width: calc(100% - 1rem);
    margin: 0;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    header {
        height: 11rem;
    }

    header h1 {
        font-size: 3rem;
    }

    header nav li {
        margin-left: 1rem;
        margin-top: 1.2rem;
    }
}

.items {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5rem;
}

.items li {
    position: relative;
    width: calc(50% - 1rem);
    padding: 0;
    margin: 0.5rem;
    background-color: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.items li#measure {
    position: absolute;
    left: -1000rem;
    top: -1000rem;
    visibility: hidden;
    opacity: 0;
}

.items li.is-unavailable > :not(.banner) {
    opacity: 0.6;
}

@media (min-width: 513px) {
    .items li {
        width: calc(33.33333333% - 1rem);
    }
}

@media (min-width: 769px) {
    .items li {
        width: calc(25% - 1rem);
    }
}

@media (min-width: 1025px) {
    .items li {
        width: calc(20% - 1rem);
    }
}

@media (min-width: 1201px) {
    .items li {
        width: calc(14.2857142857% - 1rem);
    }
}

@media (min-width: 2001px) {
    .items li {
        width: 240px;
    }
}

.items li img {
    width: 100%;
    cursor: pointer;
}

.items li article {
    padding: 0.5rem;
    margin-bottom: 1.5rem;
}

.items li article h1 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
}

.items .creator {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
}

.items .price {
    position: absolute;
    display: flex;
    justify-content: space-between;
    bottom: 0.3rem;
    width: calc(100% - 1rem);
    margin: 0;
    color: #c32626;
}

.items button {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    padding: 0.3rem 0.5rem;
    border: none;
    color: #fff;
    background-color: #0693ba;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 2px;
    outline: none;
    transition: background-color 0.2s ease;
}

.items button:hover {
    background-color: #116e88;
}

.items .banner {
    position: absolute;
    left: -3rem;
    top: 2rem;
    width: 12rem;
    padding: 0.3rem 0;
    color: #fff;
    background-color: #c32627;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    transform: rotate(-45deg);
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 1.7rem;
    padding: 0 0.5rem;
    font-size: 0.9rem;
    color: #fff;
    background: linear-gradient(45deg, #044b5f, #1697bb);
    border-top: 1px solid #6ca7bc;
}

footer a {
    color: #fff;
}

.enlarge {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.9);
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s ease 0s;
}

.enlarge.is-visible {
    pointer-events: all;
    opacity: 1;
    transition-delay: 0.1s;
}

.enlarge img {
    max-width: 100%;
    border-radius: 5px;
    box-shadow: 0 0 20px #000;
}

.dlg {
    position: fixed;
    top: 9.5rem;
    right: -100vw;
    width: 90vw;
    height: calc(100vh - 9.5rem - 1.7rem);
    max-width: 400px;
    padding: 1rem;
    color: #fff;
    background-color: #148daf;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: right 0.4s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .dlg {
        top: 11rem;
        right: -66vw;
        width: 33vw;
        height: calc(100vh - 11rem - 1.7rem);
    }
}

.dlg h1 {
    font-size: 1.3rem;
    margin: 1rem 0 0;
}

.dlg.is-visible {
    right: 0;
}

.btn-close {
    position: absolute;
    top: 0;
    right: 0;
    border: none;
    color: #fff;
    font-size: 2rem;
    background: transparent;
    cursor: pointer;
    outline: none;
}

.btn-close::after {
    content: "×";
}

.dlg img {
    width: 240px;
    margin: 1rem 0 0;
    border-radius: 5px;
}

.dlg a {
    color: #8de0ff;
    text-decoration: underline;
    font-weight: 700;
}

.dlg .btn-small {
    border: none;
    color: #fff;
    background-color: #0f5164;
    border-radius: 2px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dlg .btn-small:hover {
    background-color: #07313e;
}

.dlg ul {
    font-size: 1.2rem;
}

li.gap {
    margin-top: 2rem;
}

p.small {
    line-height: 1.2;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .dlg ul {
        font-size: 1rem;
    }

    p.small {
        font-size: 0.8rem;
    }
}

textarea.copy {
    position: absolute;
    width: 0;
    height: 0;
    border: none;
    opacity: 0;
}

.msg {
    position: fixed;
    right: 1rem;
    top: 1rem;
    width: 15rem;
    padding: 0.5rem 1rem;
    border-radius: 7px;
    color: #fff;
    background-color: #33d116;
    opacity: 0;
    transition: opacity 2s ease;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.msg.is-error {
    background-color: #ec600e
}

.msg.is-visible {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.load-more {
    padding: 2rem;
    text-align: center;
    color: #0f7a99;
}

.dlg h2 {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
}

.dlg h2 + ul {
    margin: 0;
}

ul.object-contents {
    padding: 0;
    font-size: 0.8rem;
    list-style-type: none;
}

ul.object-contents li {
    padding: 0 0 0 1.2rem;
    background-repeat: no-repeat;
    background-size: 1rem 1rem;
}
