﻿/* Alert */
.mud-alert-filled-success {
    background-color: var(--mud-palette-tertiary) !important;
}

/* Scroll To Top */
.scroll-to-top {
    position: fixed !important;
    bottom: 30px;
    right: 20px;
    z-index: 1000;
    color: var(--mud-palette-secondary) !important;
    background-color: var(--mud-palette-tertiary) !important;
    border: 1px solid var(--mud-palette-secondary) !important;
    
    &:hover {
        transform: scale(1.25);
        transition: 0.1s;
    }
}

/* Login Page */
.login-background {
    position: relative;
    height: 100vh;
    background-image: url('/images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
   
    &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(34, 40, 49, 0.70); /* #222831 - primary */
        z-index: 1; /* Above the background but below content */
    }

    & > * {
        position: relative;
        z-index: 2; /* Ensure content is above overlay */
    }
    
    .login {
        overflow: hidden !important;
        background-color: white !important;
        padding: 50px 30px !important;
        border-radius: 3px !important;
        width: 360px !important;
    }

    .login::before, .login::after {
        content: "" !important;
        position: absolute !important;
        width: 700px !important;
        height: 700px !important;
        border-top-left-radius: 40% !important;
        z-index: -1;
    }

    .login::before {
        left: 40% !important;
        bottom: -130% !important;
        background-color: rgba(69, 105, 144, 0.15) !important;
    }

    .login::after {
        left: 35% !important;
        bottom: -125% !important;
        background-color: rgba(2, 128, 144, 0.2) !important;
    }

    /* custom color because login is outside of MainLayout where blazor vars are defined */
    .mud-input {
        color: #393E46 !important;
        border-bottom: 1px solid #393E46;
    }

    a {
        font-size: 12px;
        text-decoration: underline !important;
    }
}

/* Home Page */
.home-background {
    position: relative;
    height: 80vh;
    background-image: url('/images/home-bg-1-dark.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Keeps it in place while scrolling */
    display: flex;
    justify-content: center;
    
    &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(34, 40, 49, 0.60); /* #222831 - primary */
        z-index: 1; /* Above the background but below content */
    }

    & > * {
        position: relative;
        z-index: 2; /* Ensure content is above overlay */
    }

    .home-nav-bar {
        margin-top: 128px;
        margin-bottom: -128px;
    
        .mud-link {
            color: var(--mud-palette-secondary) !important;
            font-weight: bold;
        
            &:hover {
                color: var(--mud-palette-tertiary) !important;
                text-decoration: none !important;
                transition: 0.1s;
            }
        }
    }
}

.home-container-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    
    hr {
        width: 100%;
        color: var(--mud-palette-primary);
        margin: 0;
    }

    .mud-grid {
        padding: 40px 16px;
        margin: 0;
     
        .mud-grid-item {
            padding: 0;
        }
    }

    .card-grid {
        padding: 0px 16px;
    
        .card-grid-item {
            padding: 12px;
        }

        .card-grid-item-content {
            background-color: var(--mud-palette-secondary);
            color: var(--mud-palette-primary);
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        
            &:hover {
                background-color: var(--mud-palette-tertiary);
                color: var(--mud-palette-secondary);
                transform: scale(1.05);
                transition: 0.25s;
            }
        }
    }
}

/* Partitioned Background */
.partition-background {
    position: relative;
    height: 50vh;
    background-color: var(--mud-palette-primary);
    background-attachment: fixed;
    
    &::before, &::after {
        content: "" !important;
        width: 600px !important;
        position: absolute !important;
        border-top-right-radius: 50% !important;
        border-bottom-right-radius: 50% !important;
        z-index: -1;
    }

    &::before {
        height: 550px !important;
        left: -320px !important;
        bottom: -350px !important;
        background-color: rgba(69, 105, 144, 0.15) !important;
    }

    &::after {
        height: 600px !important;
        left: -260px !important;
        bottom: -400px !important;
        background-color: rgba(2, 128, 144, 0.2) !important;
    }

    & > * {
        position: relative;
        z-index: 2; /* Ensure content is above overlay */
    }

    .partition-content {
        position: absolute;
        top: 20vh;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* Menu and Links */
.mud-drawer-header {
    padding: 0;
}

.mud-nav-link:hover, .active {
    background-color: #00ADB5 !important;
    color: #EEEEEE !important;
    transition: 0s;
}

/* Title Section Formatting */
.section-title {
    font-weight: bold;
    color: var(--mud-palette-tertiary);
    border-bottom: 2px solid var(--mud-palette-tertiary);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.title-left {
    padding-right: 100px;
}

.title-right {
    padding-left: 100px;
}

.title-center {
    padding-inline: 100px;
}


/* Accent Section */
.section-accent-primary {
    color: var(--mud-palette-secondary);
    background: var(--mud-palette-primary);
}

.section-accent-secondary {
    color: var(--mud-palette-primary);
    background: var(--mud-palette-secondary);
}

.section-accent-tertiary {
    color: var(--mud-palette-secondary);
    background: var(--mud-palette-tertiary);
    .section-title {
        color: var(--mud-palette-secondary);
        border-bottom: 2px solid var(--mud-palette-secondary);
    }
}

.section-accent-properties {
    padding: 48px;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.section-profile {
    max-width: 800px;
}

.custom-card {
    background-color: var(--mud-palette-secondary);
    color: var(--mud-palette-primary);
    padding: 20px;
    
    .mud-icon-button:hover {
        background-color: transparent;
        transform: scale(1.25);
        transition: 0.25s;
    }

    .card-image {
        width: 100%;
        height: auto;
    }

    .mud-chip {
        padding-inline: 20px;
        background: var(--mud-palette-tertiary);
        color: var(--mud-palette-secondary);
    }

    &:hover {
        transform: scale(1.025);
        transition: 0.25s;
    }
}

.custom-dialog {
    background-color: var(--mud-palette-primary) !important;
    color: var(--mud-palette-secondary) !important;
    padding: 20px 30px;
    width: 90%;

    .mud-dialog-content {
        padding-inline: 0 10px;
        margin-bottom: 20px;
        max-height: 500px;
        overflow-y: auto;
    }

    .mud-dialog-actions {
        padding-inline: 0;
    }

    .mud-input, .mud-input-label, .mud-icon-button-label {
        color: var(--mud-palette-secondary) !important;
        background-color: var(--mud-palette-primary);
    }

    .mud-select {
        width: 100% !important;
    }

    .mud-switch {
        margin: 0;
    }

    .mud-switch-track {
        background-color: var(--mud-palette-secondary) !important;
    }
}

.mud-tabs-toolbar-content {
    color: var(--mud-palette-primary);
    background-color: var(--mud-palette-secondary);
    
    .mud-tab-active {
        color: var(--mud-palette-tertiary);
    }

    .mud-tab-slider {
        background-color: var(--mud-palette-tertiary);
    }

    .mud-tab:hover {
        color: var(--mud-palette-secondary);
        background-color: var(--mud-palette-tertiary);
        opacity: 0.75;
    }
}

.truncate-chip-text {
    text-align: center;
    width: 125px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-streams {
    .mud-input-label {
        color: var(--mud-palette-primary) !important;
        background-color: var(--mud-palette-secondary);
    }
}
