/* colors */
body {
    --primary-color: #fff3e0;
    --primary-light-color: #ffffff;
    --primary-dark-color: #ccc0ae;
    --secondary-color: #ffab91;
    --secondary-light-color: #ffddc1;
    --secondary-dark-color: #c97b63;
    --text-color: #000000;
    --light-text-color: #696969;

    --snippet-border-radius: 5px;
    --snippet-frame-border: 1px;
}

/* to override browser defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* page alignment */
.page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-height: 100vh;
}

.page-nav {
    padding: 2px 10px;
    background-color: var(--primary-dark-color);
    height: 65px;
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.page-content {
    height: 100%;
}

.page-footer {
    border-top: 1px solid var(--primary-dark-color);
    margin: auto 20% 0;
    padding: 15px;
    height: 60px;
}

.page-footer > p {
    color: var(--light-text-color);
    font-size: 0.75em;
}

/* common */
.center-text {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mv-20 {
    margin: 20px 0px;
}

.m-search-content {
    margin: 20px 10%;
}

.not-displayed {
    display: none;
}

.danger-text {
    color: red;
    font-weight: bolder;
}

.black-link {
    color: black;
    text-decoration: none;
    font-weight: bolder;
}

.black-link:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
article,
time,
legend,
label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
        'Helvetica Neue', sans-serif;
}

input[type='text'],
input[type='email'],
input[type='password'] {
    font-size: 0.9em;
}

.info-text {
    color: var(--secondary-dark-color);
    display: block;
    margin: 4% 10% 0;
}

#dateText {
    font-size: 0.8em;
    margin: 0% 10%;
}

/* code snippets */
.snippet-container {
    margin: 30px auto;
    border: var(--snippet-frame-border) solid #d1d1d1;
    border-radius: var(--snippet-border-radius);
    width: 86vw;
    min-width: 80vw;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.snippet-header {
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    background-color: var(--primary-color);
    border-radius: var(--snippet-border-radius) var(--snippet-border-radius) 0 0;
    height: 45px;
}

/* profile */
.profile-img {
    object-fit: cover;
    border-radius: 50%;
    width: 25px;
    height: 25px;
}

.nav-profile {
    object-fit: cover;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
}

.sidebar-avatar {
    margin: 15px 0px;
    object-fit: cover;
    border-radius: 50%;
    width: 120px;
    height: 120px;
}

/* flex froups */
.end-flex-group {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 1;
}

.end-flex-group > img,
.end-flex-group > button,
.end-flex-group > div,
.end-flex-group > a {
    margin: 0 18px;
}

.end-flex-group:last-child {
    margin: 0;
}

.start-flex-group {
    display: flex;
    justify-content: start;
    align-items: center;
}

.start-flex-group a,
.start-flex-group p,
.start-flex-group h2 {
    margin: 0 7px;
}

.start-flex-group > img {
    margin: 0 7px;
}

.profile-view-flex {
    display: flex;
    flex-direction: row;
}

.snippet-demo-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background-color: var(--primary-color);
    border-radius: var(--snippet-border-radius) var(--snippet-border-radius) 0 0;
    height: 30px;
}

.tabs-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
}

.tab-content {
    width: 100%;
}

.sidebar {
    margin: 10% 4%;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25%;
}

.sidebar h3,
.sidebar p {
    overflow-wrap: break-word;
}

/* specific */
#aboutProfile {
    text-align: center;
    margin: 15px 0px;
    overflow-wrap: break-word;
}

/* buttons */
.primary-btn {
    display: inline-block;
    background-color: var(--secondary-light-color);
    border: none;
    border-radius: 5%;
    text-align: center;
    padding: 6px 6px;
    min-width: 9vw;
    font-size: 13px;
    font-family: sans-serif;
    color: black;
    outline: none;
    position: relative;
    overflow: hidden;
}

.primary-btn::after {
    display: none;
    content: "";
    position: absolute;
    border-radius: 50%;
    background-color: rgba(134, 134, 134, 0.3);
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    cursor: pointer;
    top: 50%;
    left: 50%;
    animation: ripple 1s;
    opacity: 0;
}

.primary-btn:focus:not(:active)::after {
    display: block;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
    cursor: pointer;
}

@keyframes ripple {
    from {
        opacity: 1;
        transform: scale(0);
    }
    to {
        opacity: 0;
        transform: scale(10);
    }
}

.icon-btn {
    background-color: transparent;
    border: none;
    overflow: hidden;
    outline: none;
    cursor: pointer;
}

.scale-btn:active {
    transform: scale(2);
    transition: all 0.4s linear;
}

.form-btn {
    align-self: center;
    min-width: 12vw;
    margin: 20px 0;
}

/* forms */
.search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.mobile-search-form {
    display: none;
}

.search-field {
    border: 1px solid #d6d9dc;
    border-radius: 3px;
    height: 50%;
    width: 190px;
    margin: 1px 5px;
    padding: 1px 5px;
    font-size: 0.9em;
}

.mobile-search-form .search-field {
    flex: 1;
    align-self: center;
}

.snippet-form {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: stretch;
    margin: 40px 10%;
}

.snippet-form-header {
    display: flex;
    justify-content: start;
    align-items: center;
    height: 45px;
    padding: 5px 10px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
    width: 100%;
}

.snippet-form-header > input[type='text'] {
    border: 1px solid #d6d9dc;
    border-radius: 3px 0px 0px 3px;
    height: 80%;
    width: 70%;
    padding: 5px;
    flex: 1;
}

.snippet-form-header > select {
    height: 80%;
    width: 80px;
    padding-left: 10px;
    border-radius: 0px 3px 3px 0px;
    text-align: center;
    -webkit-appearance: none;
    background-color: var(--secondary-light-color);
}

.snippet-form-header > select:hover {
    background-color: var(--secondary-color);
    cursor: pointer;
}

.snippet-form .access-fieldset {
    border: none;
    margin-bottom: 20px;
}

.snippet-form .access-fieldset legend {
    margin-right: 18px;
}

.snippet-form .access-fieldset label {
    display: block;
    padding: 0 20px 0 10px;
}

.snippet-form .access-fieldset input[type='radio'] {
    margin-top: 2px;
}

.snippet-form .access-fieldset label,
.snippet-form .access-fieldset input[type='radio'],
.snippet-form .access-fieldset legend {
    float: left;
}

.snippet-form > textarea {
    border: 1px solid #d6d9dc;
    border-radius: 0 0 3px 3px;
    height: 300px;
    width: 100%;
    padding: 7px 15px;
    resize: none;
    font-family: Menlo, "Bitstream Vera Sans Mono", "DejaVu Sans Mono", Monaco, Consolas, monospace;
    font-size: .8em;
    overflow: auto;
}

.profile-form {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    margin: 40px 10%;
}

.login-form {
    border: 3px solid #d6d9dc;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    width: 50%;
    max-width: 420px;
    margin: 75px auto;
}

.form-field {
    display: flex;
    justify-content: center;
    align-self: stretch;
    align-items: center;
    margin: 15px 15px;
}

.form-field label {
    margin: 0 15px 10px 0;
    width: 25%;
    min-width: 100px;
    text-align: end;
}

.form-field input[type='text'],
.form-field input[type='email'],
.form-field input[type='password'] {
    border: 1px solid #d6d9dc;
    border-radius: 3px;
    height: 80%;
    width: 75%;
    padding: 5px;
}

.form-field input[type='text']:focus,
.form-field input[type='email']:focus,
.form-field input[type='password']:focus {
    background-color: var(--primary-color);
}

.form-field input[type='file'] {
    height: 80%;
    width: 75%;
    padding: 5px;
}

/* dropdown */
.dropdown {
    position: relative;
    display: block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content a,
.dropdown-content button {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    text-align: start;
    font-size: 1em;
    display: block;
    background-color: transparent;
    outline: none;
    border: none;
    width: 100%;
}

.dropdown-content a:hover,
.dropdown-content button:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* .dropdown:hover .dropbtn {
    background-color: #57524a63;
} */

/* tabs */
.tab-panel {
    overflow: hidden;
    display: flex;
    justify-content: start;
    align-self: stretch;
    align-items: stretch;
    margin: 3%;
}

.tab-panel .tab-link {
    color: var(--light-text-color);
    text-align: center;
    font-size: 1em;
    cursor: pointer;
    margin: auto;
    padding: 4px 7px;
    transition: 0.2s;
    border: none;
    border-bottom: 3px solid transparent;
    outline: none;
    background-color: transparent;
}

.tab-panel .tab-link:hover:not(.current) {
    border-bottom: 3px solid var(--light-text-color);
}

.tab-panel .tab-link.current {
    border-bottom: 3px solid var(--secondary-color);
    color: var(--text-color);
}

/* lists */
ul.follow-list {
    list-style-type: none;
}

ul.follow-list > li {
    height: 75px;
    margin: 10px 0px;
}

ul.follow-list > li > img {
    float: left;
    display: block;
    width: 48px;
    height: 48px;
    margin: 8px 20px 8px 10%;
    border-radius: 50%;
}

.username {
    display: inline-block;
    margin: 9px 0px 0px;
}

.about-list {
    margin: 5px;
    color: var(--light-text-color);
    font-size: 0.85em;
    overflow: hidden;
}

ul.snippets {
    list-style-type: none;
}

ul.snippets > li {
    margin: 35px auto;
    border: var(--snippet-frame-border) solid #d1d1d1;
    border-radius: var(--snippet-border-radius);
    width: 60vw;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.snippet-demo-name {
    width: 80%;
    text-overflow: ellipsis;
    overflow: hidden;
}

.snippet-demo-lang {
    width: 20%;
    min-width: 10vw;
    text-align: end;
    text-overflow: ellipsis;
    overflow: hidden;
}

.site-heading {
    font-family: "Trebuchet MS", Helvetica, sans-serif;
    text-decoration: none;
    font-weight: bold;
    color: black;
    font-size: 1.35em;
}

@media only screen and (max-width: 610px) {
    .search-form {
        display: none;
    }

    .mobile-search-form {
        display: flex;
        justify-content: center;
        align-items: stretch;
        height: 65px;
        margin: 0px auto;
        padding: 0 5px;
    }

    .profile-view-flex {
        flex-direction: column;
        align-items: stretch;
    }

    .sidebar {
        margin: 4% 4%;
        width: 100%;
    }

    ul.snippets > li {
        width: 80vw;
        margin: 20px auto;
    }

    .form-field {
        flex-direction: column;
        align-items: start;
    }

    .form-field label {
        width: 100%;
        text-align: start;
    }

    .form-field input[type='text'],
    .form-field input[type='email'],
    .form-field input[type='password'] {
        width: 100%;
    }

    .form-btn {
        min-width: 22vw;
    }

    .login-form {
        width: 80%;
    }

    .snippet-form .access-fieldset {
        margin-bottom: 10px;
    }
    .snippet-form .access-fieldset legend {
        width: 100px;
        float: none;
        margin-bottom: 15px;
    }
    .snippet-form .access-fieldset label {
        padding: 0 10px 0 5px;
    }

    .end-flex-group > img,
    .end-flex-group > button,
    .end-flex-group > div,
    .end-flex-group > a {
        margin: 0 3%;
    }
}
