﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

:root {
    --primary-color: #2563eb;
    --primary-color-hover: #1d4ed8;
    --secondary-color: #2E515F;
    --secondary-color-light: #407286;
}

html {
    font-size: 14px;
    background-color: #F6F8FA;
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    background-color: #F6F8FA;
}

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

.color-red {
    color: #DB4437 !important;
}
.color-green {
    color: #0F9D58 !important;
}
.color-blue {
    color: #1B6EC2 !important;
}

.container{
    max-width: 720px !important;
}

.insights-link {
    text-align: right;
    font-size: 12px;
    margin-top: -6px;
}

.navbar-toggler{
    border: none;
}

header.home {
    height: 300px;
    color: #fff;
    background-image: url('/img/background.svg');
    background-position-y: center bottom;
    background-repeat: no-repeat;
}

a.header-title {
    white-space: normal;
    text-align: center;
    word-break: break-all;
    font-weight: bold;
    display: inline-block;
    padding-top: .3125rem;
    padding-bottom: .3125rem;
    font-size: 1.45rem;
    line-height: inherit;
    color: var(--secondary-color);
    text-decoration: none;
    margin-bottom: 20px;
}

header.home .header-title{
    margin-top: 30px;
    color: #fff;
}

/* Transactions list index */

.total-profit {
    background-color: #EDEEF5;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
}
.total-profit .total-transaction{ 
    flex: 1 0 auto;  
    padding-left: 10px; 
}
.total-profit .create-transaction{  
    flex: 0 0 100px;
    text-align: right;
    padding: 10px;
}
.total-profit .profit{
    font-size: 18px;
    font-weight: bold;  
    color: var(--secondary-color);
}
.total-profit .description{
    color: #808080;
    font-weight: bold;
}

.period-title {
    color: #808080;
    font-weight: bold;
    text-align: right;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.period-title .month-name{
    display: inline-block;
    padding: 10px 10px 10px 10px;
}

.period-title .month-toggle{
    display: inline-block;
    padding: 10px 10px 10px 10px;
}

.period-year {
    text-align: center;
    display: block;
    color: var(--secondary-color);
    cursor: default;
}

.transaction {
    display: flex;
    background-color: #fff;
    margin-bottom: 10px;
    padding: 10px 20px;
}  
.transaction:hover{
    background-color: #EDEEF5;
    cursor: pointer;
}
.transaction .details {
    flex: 0 0 none;
}
.transaction .product{   
    color: var(--secondary-color);
    font-size: 15px;
    font-weight: bold;
}
.transaction .date {
    font-size: 13px;
    color: #666;
}
.transaction .profit {
    flex: 1 0 auto;
    font-size: 17px;
    text-align: right;
}

.transaction .profit-user-split{
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}
.transaction .profit-user-split .user-amount{
    display: inline-block;
}

.transaction .payment-direction{
    font-size: 11px;
    margin-top: 2px;
    margin-bottom: 2px;
}

.transaction .shipping-debt{      
    font-size: .675em;
    position: relative;
    bottom: 2px;
    display: block;
}

.show-more {
    display: block;
    text-align: center;
    padding: 10px;
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 15px;
    color: #bbb;
}

.show-more .fa-plus{
    font-size: 11px;
    position: relative;
    bottom: 2px;
    margin-left: 5px;
}

/* Create/Update view */

label{
    cursor: pointer;
}

.create-transaction-intro {
    background-color: #EDEEF5;
    padding: 20px;
}

.create-transaction-intro .description{
    color: #808080;
    font-weight: bold;
}

.share-percentage-tags{
    display: flex;
    justify-content: space-evenly;
    list-style-type: none;
    padding: 0;
}
.share-percentage-tags li{
    background-color: #EDEEF5;
    padding: 3px 6px;
    border-radius: 5px; 
    width: 25%;
    text-align: center;
    margin-right: 5px;
}
.share-percentage-tags li:last-child{
    margin-right: 0;
}

.share-percentage-tags li.active,
.share-percentage-tags li:hover {
    cursor: pointer;
    filter: brightness(0.85);
}

a {
    color: var(--primary-color);
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color-hover);
}

.form-label {
    color: #808080;
    font-size: 12px;
    font-weight: bold;
}

.form-label.required:after {
    content:" *";
    color: red;
}

.form-group, .form-floating {
    margin-bottom: 15px;
}

.input-group .input-group-text {
    background-color: transparent;
    padding-right: 0;
}

.input-group input{
    border-left: none;
}

.form-switch.form-switch-md {
    margin-bottom: 5px;
}

.form-switch.form-switch-md .form-check-input {
    height: 1.5rem;
    width: calc(2rem + 0.75rem);
    border-radius: 3rem;
    margin-right: 10px;
}

.form-switch.form-switch-md .form-check-label{
    margin-top: 3px;
}

/* Sticky footer styles
-------------------------------------------------- */

.footer {
    box-shadow: 0px -4px 5px 0px rgba(0,0,0,0.05);
    position: fixed;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    height: 75px; /* Vertically center the text there */
    padding: 15px 0;
    line-height: 25px;
    background-color: #fff;
}

.footer a{
    text-decoration: none;
    color: var(--secondary-color-light);
}

footer .svg-inline--fa {
    font-size: 1.5em;
}


footer a:not(.active) {
    opacity: 0.5;
}


/** Bar chart */

.bar-graph {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 25px;
    height: 185px;
    overflow-x: auto;
}

.bar-graph .bar-container {
    display: inline-block;
    height: 140px;
    position: relative;
    text-align: center;
    width: 12%;
    min-width: 60px;
    margin-right:2px;
}

.bar-graph .bar-container:last-child{
    margin-right: 0;
}

.bar-graph .bar {
    border-radius: 3px;
    bottom: 40px;
    position: absolute;
    width: 100%;
    overflow: hidden;
}

.bar-graph .month {
    bottom: 20px;
    left: 0;
    margin: 0 auto;
    position: absolute;
    right: 0;
    font-size: 14px;
}

.bar-graph .month > .month-name{
    color: #fff;
}

.bar-container a{
    text-decoration: none;
    color: #212529;
}

.bar-graph .bar::after {
    color: #e5e5e5;
    font-weight: 700;
    white-space: nowrap;
    position: absolute; 
    left: 0;
    right: 0;
    top: 30px;
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
}

.bar-graph .bar-empty .bar {
    background-color: #EDEEF5;
}

.bar-graph .bar-1 .bar {
    background-color: #64b2d1;
}

.bar-graph .bar-2 .bar {
    background-color: #5292ac;
}

.bar-graph .bar-3 .bar {
    background-color: var(--secondary-color-light);
}

.bar-graph .bar-4 .bar {
    background-color: var(--secondary-color);
}

/* Insights horizontal layout */

.insights-wrapper {
    display: flex;
    margin-top: 15px;
}

.insights-labels {
    flex: 0 0 auto;
    width: 125px;
    min-width: 120px;
    position: sticky;
    left: 0;
    z-index: 10;
    padding-right: 10px;
}

.insights-labels .insight-header {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insights-labels .insight-label {
    min-height: 45px;
    display: flex;
    align-items: center;
    font-size: 0.75em;
    color: #666;
    border-bottom: 1px solid #e8e8e8;
    padding: 16px 0;
    line-height: 1.2;
}

.insights-labels .insight-label:last-child {
    border-bottom: none;
}

.insights-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 0 0 20px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.insights-year-card {
    flex: 0 0 auto;
    width: 200px;
    min-width: 200px;
    background-color: #fff;
    border-radius: 10px;
    padding: 10px 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    scroll-snap-align: start;
}

.insights-year-card .insight-header {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insights-year-card .period-year {
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    color: var(--secondary-color-light);
}

.insights-year-card .insight-value {
    min-height: 45px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    font-weight: 600;
    text-align: right;
    font-size: 0.9em;
    border-bottom: 1px solid #f0f0f0;
    padding: 8px 0;
}

.insights-year-card .insight-value:last-child {
    border-bottom: none;
}

.insight-value .profit-user-split {
    font-size: 0.75em;
    font-weight: normal;
    margin-top: 5px;
    line-height: 1.4;
}

/* Hide scrollbar but keep functionality */
.insights-container::-webkit-scrollbar {
    height: 6px;
}

.insights-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.insights-container::-webkit-scrollbar-thumb {
    background: var(--secondary-color-light);
    border-radius: 3px;
}

.insights-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* More menu */

.more-menu {
    padding-bottom: 20px;
}

.more-menu-section-title {
    color: #808080;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-top: 20px;
    margin-bottom: 8px;
    padding-left: 5px;
}

.more-menu-section-title:first-child {
    margin-top: 0;
}

.more-menu-section {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.more-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--secondary-color);
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
}

.more-menu-item:last-child {
    border-bottom: none;
}

.more-menu-item:hover {
    background-color: #f6f8fa;
    color: var(--secondary-color);
    text-decoration: none;
}

.more-menu-item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8f0fe;
    border-radius: 8px;
    margin-right: 14px;
    color: var(--primary-color);
    font-size: 15px;
    flex-shrink: 0;
}

.more-menu-item-label {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.more-menu-item-chevron {
    color: #bbb;
    font-size: 12px;
    margin-left: 10px;
}

/* Identity / Auth pages */

.auth-container {
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-title {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.auth-links {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-links a {
    font-size: 14px;
    color: var(--secondary-color-light);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}