/**
 * TikTok Calculator Styles
 */

:root {
    --mutedColor: #818e94;
    --primaryRedColor: #fd295a;
    --cyanColor: #01cac0;
    --borderLightCyan: rgba(1, 202, 192, 0.3);
}

/* Form Loading Animation */
form.loading {
    position: relative;
}

form.loading::after {
    content: url('data:image/svg+xml; utf8, <svg aria-hidden="true" width="50" height="50" focusable="false" data-prefix="fad" data-icon="spinner" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-spinner fa-w-16 fa-2x"><g class="fa-group"><path fill="rgb(244, 34, 110)" d="M108.92 355.08a48 48 0 1 0 48 48 48 48 0 0 0-48-48zM256 416a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm208-208a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm-60.92 147.08a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0-198.16a48 48 0 1 0-48-48 48 48 0 0 0 48 48z" class="fa-secondary"></path><path fill="rgb(2, 156, 149)" d="M108.92 60.92a48 48 0 1 0 48 48 48 48 0 0 0-48-48zM48 208a48 48 0 1 0 48 48 48 48 0 0 0-48-48zM256 0a48 48 0 1 0 48 48 48 48 0 0 0-48-48z" class="fa-primary"></path></g></svg>');
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 999;
    animation: 1s linear infinite rotate;
}

@keyframes rotate {
    from {transform: rotate(0deg);}
    to {transform: rotate(360deg);}
}

form.loading::before {
    content: '';
    display: flex;
    transition: 500ms;
    justify-content: center;
    align-items: center;
    position: absolute;
    width: 120%;
    height: 120%;
    left: -10%;
    top: -10%;
    border-radius: 20px;
    z-index: 999;
    backdrop-filter: blur(3px);
}

/* Response Wrapper Styles */
.response-wrapper {
    font-family: 'Poppins', Verdana, Sans-Serif;
    font-weight: 400;
}

.vertical-align-center {
    display: inline-block;
    vertical-align: middle;
    float: none;
}

/* User Stats Styles */
ul.user-stats {
    list-style: none;
    padding: 0;
}

ul.user-stats > li {
    font-size: 1rem;
    color: var(--mutedColor);
    font-weight: 200;
}

ul.user-stats span.user-stat {
    font-weight: 500;
}

/* Rate Styles */
.rate-percentage {
    font-size: 3rem;
    color: var(--primaryRedColor);
    font-weight: 500;
}

h5.user-name {
    font-size: 1.75rem;
}

.rate-title {
    font-size: .9rem;
    color: var(--mutedColor);
}

/* Section Styles */
.section-title {
    font-size: calc(1.25rem + .2vw);
}

.top-post-title {
    font-size: 1.2rem;
    color: var(--primaryRedColor);
    border-bottom: 1px solid var(--cyanColor);
}

.post-title {
    color: var(--mutedColor);
}

.table-title {
    font-size: 1.25rem;
}

/* Table Styles */
table.stats-table {
    color: var(--mutedColor);
}

table.stats-table td {
    vertical-align: middle;
}

table.stats-table tr {
    border-top: 1px solid var(--borderLightCyan);
}

table tbody tr:hover > td, table tbody tr:hover > th {
    background-color: transparent !important;
}

td.stat-icon {
    width: 1%;
    white-space: nowrap;
}

.stat-icon .fa-circle {
    color: var(--primaryRedColor);
    transform: scale(2.8) translateY(-6px);
}

.stat-icon .fa-stack-1x {
    transform: scale(1.2);
}

table thead:first-child tr:first-child th {
    border-top: none;
    border-bottom: 1px solid var(--borderLightCyan);
}

/* Populars Table Styles */
table.table-for-populars thead > tr {
    color: #2d2f39 !important;
}

table.table-for-populars tbody > tr {
    color: var(--mutedColor);
    transition: ease-in-out all 0.1s;
}

table.table-for-populars tbody > tr > td {
    vertical-align: middle !important;
}

table.table-for-populars tbody > tr:hover {
    background: azure !important;
    cursor: pointer;
    text-decoration: none;
    color: currentColor;
}

table.table-for-populars-mobile {
    cursor: default;
}

table.table-for-populars-mobile tbody tr:first-child {
    font-weight: 500 !important;
}

table.table-for-populars-mobile tbody tr:not(:first-child),
table.table-for-populars-mobile tbody tr:not(:first-child) th {
    font-weight: 400 !important;
}

table.table-for-populars-mobile tbody td,
table.table-for-populars-mobile tbody th {
    padding: .5rem 0;
}

table.table-for-populars-mobile tbody td {
    color: var(--mutedColor);
}

table.table-for-populars-mobile tr {
    border-top: 1px solid var(--borderLightCyan);
}

/* Shadow and Ranking Styles */
.shadow {
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,.15) !important;
}

.ranking-post {
    text-align: left;
}

/* Form Styles */
form[name='request'] .search-icon > span {
    background-color: #0e0e0e;
    color: #fafafa;
    border-color: #0e0e0e;
}

form[name='request'] input[name='username'] {
    background-color: transparent;
    border-color: #0e0e0e;
}

form[name='request'] input[name='username']::placeholder {
    color: #0e0e0e;
    font-weight: 300;
}

/* Button Styles */
form[name='request'] button.btn-search:hover,
form[name='request'] button.btn-search:active,
form[name='request'] button.btn-search:focus {
    color: #fff;
    background-color: var(--primaryRedColor);
    border-color: #0e0e0e;
    filter: brightness(95%);
}

form[name='request'] button.btn-search {
    color: #fff;
    background-color: var(--primaryRedColor);
    border-color: #0e0e0e;
    transition: ease-in-out all 0.15s;
}

.response-wrapper button.btn-request {
    transition: ease-in-out all 0.15s;
    background-color: var(--cyanColor);
    border-color: var(--cyanColor);
    color: rgb(255, 255, 255);
}

.response-wrapper button.btn-request:hover,
.response-wrapper button.btn-request:active,
.response-wrapper button.btn-request:focus {
    border-color: var(--primaryRedColor);
    background-color: var(--primaryRedColor);
    color: #fefefe;
}

.response-wrapper button.btn-loading {
    opacity: 0.5;
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.4) !important;
    background-color: transparent;
    color: rgba(0, 0, 0, 0.6) !important;
}

.btn-loading .spinner-border {
    margin-right: 7px;
}

/* Misc Styles */
.user-is-lost a:hover {
    text-decoration: none !important;
}

.rate-engagement-profile div,
.rate-engagement-recent div {
    font-weight: 400;
}

.rate-earnings .rate-percentage {
    font-weight: 600;
}

.rate-earnings .rate-title {
    font-weight: 500;
}

ul.instructions {
    list-style-type: none;
    padding: 0;
}

.canvas {
    min-height: 320px;
}

/* Typography Styles */
.bd-title {
    font-size: calc(1.325rem + 1.75vw);
    font-weight: 500;
}

.bd-lead {
    font-size: calc(1.125rem + .2vw);
    font-weight: 400;
}

.bd-paragraph {
    font-size: calc(0.75rem + .125vw);
}

/* Calculator Specific Styles */
#calculator {
    display: inline-block;
    margin-top: -7rem;
    padding-top: 7rem;
}

#calculator .btn-calculate,
#calculator .try-again-btn {
    background-color: #01cac0;
    color: #fefefe !important;
    border: none !important;
    transition: ease-in-out all 0.2s;
}

#calculator .btn-loading {
    opacity: 0.5;
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.4) !important;
    background-color: transparent;
    color: rgba(0, 0, 0, 0.6) !important;
}

#calculator .btn-loading .spinner-border {
    margin-right: 7px;
}

div.g-recaptcha > div {
    margin: 0 auto;
}

ul.errors {
    padding-left: 0;
    list-style: none;
}

.redirect-response .spinner > div[role="status"] {
    height: 3rem;
    width: 3rem;
}

/* Responsive Styles */
@media only screen and (min-width: 360px) {
    ul.user-stats > li {
        line-height: 1.5;
    }

    .rate-percentage {
        font-size: 2.25rem;
    }
}

@media only screen and (min-width: 576px) {
    .rate-percentage {
        font-size: 2.5rem;
    }

    .post-title {
        font-size: 1rem;
    }

    .canvas {
        height: auto;
        width: 100%;
    }
}

@media only screen and (min-width: 768px) {
    .rate-percentage {
        font-size: 2rem;
    }

    .post-title {
        font-size: 1.2rem;
    }
}

@media only screen and (min-width: 992px) {
    .rate-percentage {
        font-size: 2.5rem;
    }
}
