﻿/*change color variable values https://stackoverflow.com/questions/49048192/modify-css-variables-custom-properties-in-jquery*/
/*#8243EF Bithabit*/
/*#ffbb00 Mielitieko*/
:root {
    --mdc-theme-primary: #8243EF !important;
    --mdc-theme-secondary: #000000 !important;
    --mdc-theme-on-primary: #ffffff !important;
    --mdc-theme-on-secondary: #ffffff !important;
    --mdc-theme-on-surface: #8243EF !important;
    --mdc-theme-text-primary-on-dark: #ffffff !important;
    --mdc-theme-text-primary-on-light: #000000 !important;
}

.demo-list-item-shaped .mdc-list-item {
    /* @noflip */
    border-radius: 0 32px 32px 0;
}
[dir=rtl] .demo-list-item-shaped .mdc-list-item, .demo-list-item-shaped .mdc-list-item[dir=rtl] {
        /* @noflip */
        border-radius: 32px 0 0 32px;
}

.chip-style {
    margin-left: 0.5rem;
    margin-top: 1rem;
}


.habit-card__primary{
    padding: 16px;
}
.habit-card__title{
    margin:0;
}

.habit-card__subtitle {
    color: rgba(0, 0, 0, 0.54);
    /* @alternate */
    color: var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54));
    margin: 0;
}

.habit-card__secondary {
    color: rgba(0, 0, 0, 0.54);
    /* @alternate */
    color: var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54));
    padding: 0 1rem 8px 1rem;
}


.headTitle {
    margin-top: 12px;
}

.ctn-list {
    height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
}

.item-list {
    border: 1px solid #eee;
}

.btn-cancel {
    background-color: black !important;
    color: white !important;
}

body {
    height: 100%;
}
.material-items {
    display: inline-flex;
    vertical-align: middle;
    font-size: 2rem;
}

.hide-component {
    display: none !important;
}
.txt-field {
    width: 100%;
    margin-bottom: 16px !important;
}

.app-fab--absolute {   
    position: fixed;
    top: 4.2rem;
    z-index: 4;
}

.app-search--absolute {
    position: fixed;
    top: 5rem;
    z-index: 4;
    width:100%
}

.left--absolute {
    position: fixed;
    top: 4.5rem;
    z-index: 4;
    right:8rem;
}

.app-footer {
    position: -webkit-sticky; /* Safari */
    position: sticky;
    bottom: 0;
    background-color: #eee;
    padding:8px !important;
    border-radius:10px;
}

.superadmin{

}

.admin{

}

.ctn-grid{
    grid-gap:10px;
}

.txt-area {
    width: 100%;
}

.content-center {
    width: 90%;
}
/*https://algoart.fr/articles/css-table-fixed-header*/
.table-wrapper {
   
}

    .table-wrapper th {
        position: -webkit-sticky; /* Safari */
        position: sticky;  
        top:0;
        z-index: 2;
        background-color: #eee;
        text-align: center;
    }

    .table-wrapper table {
        width: 100%;
        table-layout: fixed;
    }

    .table-wrapper td, th {
        padding: 10px;      
        word-wrap: break-word;
        white-space: normal;
        border-bottom: 1px solid #eee;       
    }

.table-col-20 {
    width: 20%
}
.table-col-40 {
    width: 40%
}
.table-col-25 {
    width: 25%
}

.table-col-30 {
    width: 30%
}

.table-col-5 {
    width: 5%
}
.table-col-10 {
    width: 10%
}

.table-col-50 {
    width: 50%
}

.pointer-style{
    cursor:pointer;
}

.main-content {
    padding-top: 70px;
    padding-left: 8px;
    padding-right: 8px;
}

main > section {
    display: none;
}

main.study > section#study,
main.studydetail > section#studydetail,
main.applanguage > section#applanguage,
main.languagedetail > section#languagedetail,
main.user > section#user,
main.userdetail > section#userdetail,
main.questionnaire > section#questionnaire,
main.questionnairedetail > section#questionnairedetail,
main.question > section#question,
main.questiondetail > section#questiondetail,
main.questionoption > section#questionoption,
main.tag > section#tag,
main.habitgroup > section#habitgroup,
main.habitgroupdetail > section#habitgroupdetail,
main.habitcontext > section#habitcontext,
main.habitcontextdetail > section#habitcontextdetail,
main.habit > section#habit,
main.habitdetail > section#habitdetail,
main.supergroup > section#supergroup,
main.supergroupdetail > section#supergroupdetail,
main.goalgroup > section#goalgroup,
main.goalgroupdetail > section#goalgroupdetail,
main.dataexport > section#dataexport {
    display: block;
}

.manage-study{

}

.exportrow {
    height: 60px;
    border-bottom: 2px solid #eee;
}

.select-custom {
    width: 100%; /* Takes full width */
    padding: 10px; /* Adds comfortable spacing */
    font-size: 16px; /* Improves readability */
    font-family: "Arial", sans-serif; /* Modern and clean font */
    border: 1px solid #ccc; /* Subtle border */
    border-radius: 5px; /* Smooth rounded corners */
    background-color: #fff; /* White background */
    color: #333; /* Darker text for readability */
    cursor: pointer; /* Indicates interactivity */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* Soft shadow effect */
    /* Keep native dropdown but remove default styles */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Custom arrow positioning */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23333'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center; /* Align arrow */
    background-size: 16px;
    padding-right: 35px; /* Prevents text overlap with arrow */
}

    /* Style when hovered */
    .select-custom:hover {
        border-color: #007bff; /* Highlighted border on hover */
    }

    /* Style when focused */
    .select-custom:focus {
        outline: none;
        border-color: #0056b3; /* Darker blue border */
        box-shadow: 0 0 5px rgba(0, 91, 187, 0.5); /* Glow effect */
    }

.search-input {
    width: 97%; /* Takes full width */
    padding: 10px 15px; /* Comfortable padding */
    font-size: 16px; /* Improves readability */
    font-family: "Arial", sans-serif; /* Modern and clean font */
    border: 1px solid #ccc; /* Subtle border */
    border-radius: 5px; /* Soft rounded corners */
    background-color: #fff; /* White background */
    color: #333; /* Darker text for better readability */
    outline: none; /* Remove default outline */
    transition: all 0.3s ease-in-out; /* Smooth transition */
}

    /* Style when hovered */
    .search-input:hover {
        border-color: #007bff; /* Light blue border on hover */
    }

    /* Style when focused */
    .search-input:focus {
        border-color: #0056b3; /* Darker blue border */
        box-shadow: 0 0 5px rgba(0, 91, 187, 0.5); /* Subtle glow effect */
    }

.custom-table {
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure the div has a fixed height */
    overflow-y: auto; /* Enable scrolling */
    overflow-x: hidden;
    max-height: 70vh; /* Adjust as needed */
    width:95%;
    margin-left:auto;
    margin-right:auto;
}

    /* Ensure table takes full width */
    .custom-table table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
    }

    /* Sticky Header */
    .custom-table thead {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #666666; /* Modern blue */
        color: white;
        text-align: left;
        font-size:0.9rem;
    }

    /* Styling for header cells */
    .custom-table th {
        padding: 15px;
        font-weight: bold;
        text-transform: uppercase;
        border-bottom: 2px solid #3b7bc3;
    }

    /* Table Row Styling */
    .custom-table td, .custom-table th {
        padding: 15px;
        text-align: left;
        border-bottom: 1px solid #ddd;
    }

    /* Alternate row colors for better readability */
    .custom-table tbody tr:nth-child(odd) {
        background-color: #f9f9f9;
    }

    /* Hover effect */
    .custom-table tbody tr:hover {
        background-color: #e3f2fd;
        transition: background-color 0.2s ease-in-out;
    }

/* Edit Button */
.edit-btn-link, .delete-btn-link {
    background: none;
    color: #007bff;
    font-size: 14px;
    font-weight: bold;
    border: none;
    padding: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

    .edit-btn-link:hover, .delete-btn-link:hover {
        color: #0056b3;
        text-decoration: underline;
    }
/* Delete Button */
.delete-btn-link {
    color: #dc3545;
}

    .delete-btn-link:hover {
        color: #a71d2a;
    }
/* Send Invitation Button */
.send-invite-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

    .send-invite-btn:hover {
        background-color: #218838;
    }

/* Styling the checkbox */
.user-checkbox {
    -webkit-appearance: none; /* Remove default checkbox appearance */
    -moz-appearance: none; /* Remove default checkbox appearance for Firefox */
    appearance: none; /* Remove default checkbox appearance for all browsers */
    width: 24px; /* Set width of the checkbox */
    height: 24px; /* Set height of the checkbox */
    border: 2px solid #eb4b49; /* Set border color */
    border-radius: 5px; /* Rounded corners */
    background-color: white; /* White background */
    transition: all 0.3s ease; /* Smooth transition for background color and border */
    position: relative; /* For positioning the checkmark */
}

    /* Checked state styling */
    .user-checkbox:checked {
        background-color: #eb4b49; /* Change background color when checked */
        border-color: #eb4b49; /* Match the border color with background when checked */
    }

        /* Checkmark styling when checkbox is checked */
        .user-checkbox:checked::after {
            content: ''; /* Add content for the checkmark */
            position: absolute; /* Position the checkmark inside the checkbox */
            top: 2px; /* Adjust top position */
            left: 6px; /* Adjust left position */
            width: 7px; /* Width of the checkmark */
            height: 14px; /* Height of the checkmark */
            border: solid white; /* Make checkmark white */
            border-width: 0 3px 3px 0; /* Create the checkmark shape */
            transform: rotate(45deg); /* Rotate to form a checkmark */
        }

    /* Hover effect for checkbox */
    .user-checkbox:hover {
        border-color: #0074D9; /* Change border color on hover */
        background-color: #f58382; /* Light background when hovering */
    }

    /* Focus effect for checkbox */
    .user-checkbox:focus {
        outline: none; /* Remove outline */
        box-shadow: 0 0 3px 2px rgba(72, 161, 229, 0.5); /* Add a subtle focus shadow */
    }

    /* Optional: Styling for labels (if used) */
    .user-checkbox + label {
        font-size: 16px; /* Increase the font size for better readability */
        color: #333; /* Darker text color */
        cursor: pointer; /* Make it look clickable */
    }