@import url("colors.css");
@import url("buttons.css");
@import url("navbar.css");

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.large-logo {
    height: 100%;
    width: 100%;
    background: white;
    position: relative;
    z-index: -1;

    img {
        height: 100%;
        width: 85%;
        display: block;
        object-fit: contain;
        margin-left: auto;
        margin-right: auto;
        object-position: center center;
    }

    &:before {
        content: '';
        position: absolute;
        z-index: 1;
        top:0;
        left:0;
        height: 100%;
        width: 30px;
        background: linear-gradient(to right, var(--color-offwhite), transparent);
    }
    &:after {
        content: '';
        position: absolute;
        z-index: 1;
        top:0;
        right:0;
        height: 100%;
        width: 30px;
        background: linear-gradient(to left, var(--color-offwhite), transparent);
    }
}

.logo-container-login {
    background-color: #ffffff;

    img {
        position: relative;
        text-align: center;
        padding: 15px 0;
        padding-top: 100px;
        padding-top: 100px;
        width: 300px;
        min-height: 50px;
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 50px;
    }
}

.enrolment-logo {
    img {
        width: 90%;
        max-width: 400px;
        max-height: 300px;
        display: block;
        margin-left: auto;
        margin-right: auto;
        object-fit: contain;
        object-position: center;
    }
}

.form-control, .form-select {
    font-size: 0.9rem;
    padding: 8px;
}

.alert {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.enroll-heading {
    text-transform: uppercase;
    font-weight: 200;
    letter-spacing: 1px;
}
@media (min-width: 1200px) {
    .modal-xxl {
        --bs-modal-width: 1440px;
    }
}
.modal-dialog {
    /*max-width: 60vw;*/
    /*background-image: url("../assets/images/liquid-bg.svg");*/
    background-size: 100% 100%;
    background-repeat: no-repeat;

    .modal-header {
        background-color: transparent;
        border-bottom: none;
        padding-bottom: 20px;
        padding-top: 10px;
    }

    .modal-title {
        font-weight: 500;
        letter-spacing: 1px;
        font-size: 1.5em;
    }

    .btn-close {
        /*filter: invert(1);*/
    }

    .modal-content {
        border-radius: 0px;
        padding: 30px;
        background: #ededed;
        border: none;
        color: var(--color-primary);

        .form-label {
            margin-bottom: 0;
            font-size: 0.8em;
            padding-left: 10px;
        }

        .form-control, .form-select {
            font-size: 0.9rem;
            padding: 8px;
            background: transparent;
            color: var(--color-primary);
            border: 1px solid var(--color-primary);
            /*border-right: 3px solid var(--color-primary);*/
            /*border-left: 3px solid var(--color-primary);*/
            border-radius: 4px;

            option {
                background: #adafb0;
            }

            &:focus {
                box-shadow: 0 0 0 3px inset var(--color-primary);
            }
        }

        table {
            box-shadow: #2b3f4f14 1px 1px 15px;
            tr {

                &:hover {
                    background: transparent;
                }

                th, td {
                    color: var(--color-primary);
                    background: transparent;
                    font-weight: 500;
                    border-bottom: 2px solid var(--color-primary);


                }

                td {
                    font-weight: 700;
                    vertical-align: middle;
                }

                &.dark, .dark {
                    background: var(--color-primary);

                    .form-control, .form-select {
                        border-color: var(--color-offwhite);
                        color: var(--color-offwhite);
                    }
                }

                /*STATUS TEXT*/

                .status-paid {
                    font-weight: bold;
                    color: #006500;
                }

                .status-partially-paid {
                    font-weight: bold;
                    color: #e0c100;
                }

                .status-unpaid {
                    font-weight: bold;
                    color: #c50000;
                }
            }

            .no-lines {
                border-color: transparent;
            }
        }
    }


}

.employee-table {
    width: 100%;
    border-collapse: collapse;

    th, td {
        padding: 10px;
        text-align: left;
        border-bottom: 1px solid var(--color-offwhite);
    }

    tr:hover {
        background-color: var(--color-secondary);
    }

    th {
        font-weight: 500;
        background-color: var(--color-offwhite);
    }

    img {
        width: 50px;
        height: 50px;
        object-fit: cover;
        border-radius: 8px;
    }

    .employee-table .icon-btn {
        color: #333333;
        text-decoration: none;

        &:hover {
            color: #000;
        }
    }

}


.qualification-input-group {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .form-control, .form-select {
        font-size: 0.8rem;
    }

    .dashboard-btn {
        padding: 15px;
        min-height: 100px;
    }

    .dashboard-btn i {
        font-size: 1.5rem;
    }

    .dashboard-btn span {
        font-size: 0.8rem;
    }

    .modal-title {
        font-size: 10px;
    }

    .employee-table th, .employee-table td {
        font-size: 0.8rem;
        padding: 8px;
    }

    .employee-table img {
        width: 40px;
        height: 40px;
    }

    .modal-dialog {
        max-width: 90vw;
    }
}

@media print {
    .navbar, .dashboard-btn {
        display: none !important;
    }

    .logo-container {
        display: block !important;
        text-align: center;
    }
}


/*LOGIN PAGE*/

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

.form-check {
    display: flex;
    align-items: baseline;

    input {
        margin-right: 10px;
    }

    .policy-name {
        font-style: italic;
        font-weight: bold;
    }
}


.alert {
    font-size: 0.9rem;
}

#learner-enrollment-form {
    p {
        font-size: 0.9em;
    }

    .card {
        overflow: hidden;

        .card-title {
            font-size: 1.3em;
            padding: 20px 25px;
            background: #212529;
            color: var(--color-offwhite);
        }

        .card-body {
            h4 {
                font-size: 1.2em;
                padding: 20px 0 10px 0;
            }
        }
    }

    .table {
        td, th {
            vertical-align: middle;
        }
    }

    .signature-table {
        h5, canvas, button {
            display: block;
            text-align: center;
            margin-left: auto;
            margin-right: auto;
        }
    }
}

.table-container {
    width: 100%;

    table {
        box-shadow: #2b3f4f14 1px 1px 15px;
        width: 100%;

        tr {
            &:nth-of-type(even) {
                /*border-bottom: grey 1px solid;*/
            }
        }

        th {
            background: #333333;
            color: var(--color-offwhite);
            padding: 15px 10px;
            font-weight: 100;
        }

        td {
            padding: 10px 10px;
            align-content: center;

            .table-buttons {
                display: flex;
                flex-wrap: wrap;
            }
        }

        td:last-child,
        th:last-child {
            width: auto; /* Ensure this column can freely adjust */
        }

        /*STATUS TEXT*/

        .status-paid {
            font-weight: bold;
            color: #006500;
        }

        .status-partially-paid {
            font-weight: bold;
            color: #e0c100;
        }

        .status-unpaid {
            font-weight: bold;
            color: #c50000;
        }
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    .navbar {
        display: none !important;
    }

    .logo-container {
        display: block !important;
        padding: 10px 0;
    }
}

/*LOGIN PAGE*/

.chart-container {
    background-color: #212529;
    border: 1px solid #424549;
    color: #ffc107;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    height: 100%;
    max-height: 510px;
    margin-bottom: 10px;
}

.report-group {
    margin-bottom: 20px;

    h5 {
        font-size: 1rem;
        font-weight: 500;
        margin-bottom: 10px;
        color: #333333;
    }

    a {
        display: block;
        font-size: 0.9rem;
        color: #333333;
        text-decoration: none;
        padding: 5px 0;

        &:hover {
            color: #ffc107;
        }
    }
}

.attendance-table {
    width: 100%;
    border-collapse: collapse;

    th, td {
        padding: 8px;
        text-align: left;
        border-bottom: 1px solid var(--color-offwhite);
    }

    tr:hover {
        background-color: var(--color-offwhite);
    }
}
.form-label {
    margin-bottom: 0;
    font-size: 0.8em;
}

.attendance-totals {
    margin-top: 15px;
    padding: 10px;
    background-color: var(--color-offwhite);
    border-radius: 4px;

    h6 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    p {
        font-size: 0.8rem;
        margin: 0;
    }
}

h2.page-title {
    width: 100%;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    text-align: center;
    margin: 2rem 0;
    color: #052f51;
}

.page-title-sub {
    width: 100%;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 2rem 0;
    color: #052f51;
}


#report-container {

    .card {
        padding: 30px;
    }

    .form-section {
        margin: 40px 0;

        h3 {
            margin-bottom: 15px;
        }

        h4 {
            margin-bottom: 20px;
        }

        .report-table {
            margin-bottom: 40px;

            .radio-column {
                text-align: center;
                width: 40px;

            }

            .reasons-items {
                display: flex;
                flex-direction: column;
            }


        }

    }
}


label.label-radio {
    display: flex;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.375em;
    transition: all 0.5s ease;
    /* Accessible outline */
    /* Remove comment to use */
    /*
        &:focus-within {
                outline: .125em solid $primary-color;
        }
    */

    input {
        position: absolute;
        left: -9999px;

        &:checked + span {
            background-color: var(--color-primary);
            transition: all 0.5s ease;

            &:before {
                box-shadow: inset 0 0 0 0.4375em var(--color-offwhite), inset 1px 1px 3px 0.4375em var(--color-primary);
            }

            i {
                transition: all 0.5s ease;
                color: var(--color-offwhite)
            }
        }
    }

    span {
        display: flex;
        align-items: center;
        padding: 0.375em;
        border-radius: 99em;
        transition: 0.5s ease;

        &:hover {
            background-color: var(--color-primary);
            transition: all 0.5s ease;


            i {
                transition: all 0.5s ease;
                color: var(--color-offwhite)
            }
        }

        &:before {
            display: flex;
            flex-shrink: 0;
            content: "";
            background-color: #fff;
            width: 1.5em;
            height: 1.5em;
            border-radius: 50%;
            transition: all 0.5s ease;
            box-shadow: inset 0 0 0 0.125em var(--color-primary);
            i {
                transition: all 0.5s ease;
                color: var(--color-offwhite)
            }
        }
    }
}


.checkbox {
    height: 0;
    width: 0;
}

.checkbox + label {
    position: relative;
    display: flex;
    margin: .6em 0;
    align-items: center;
    color: #9e9e9e;
    transition: color 250ms cubic-bezier(.4, .0, .23, 1);
}

.checkbox + label > span {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1em;
    width: 1.5em;
    height: 1.5em;
    background: transparent;
    border: 2px solid #9E9E9E;
    border-radius: 2px;
    cursor: pointer;
    transition: all 250ms cubic-bezier(.4, .0, .23, 1);
}

.checkbox + label:hover > span, .checkbox:focus + label > span {
    background: rgba(255, 255, 255, .1);
}

.checkbox:checked + label > span {
    border: 0.8em solid var(--color-primary);
    animation: shrink-bounce 200ms cubic-bezier(.4, .0, .23, 1);
}

.checkbox:checked + label > span:before {
    content: "";
    position: absolute;
    top: -0.1em;
    left: .3em;
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    transform: rotate(45deg);
    transform-origin: 0% 100%;
    animation: checkbox-check 125ms 250ms cubic-bezier(.4, .0, .23, 1) forwards;
}

.coming-soon {
    position: relative;

    &:after {
        content: 'Coming soon!';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        padding: 10px 22px 10px 15px;
        font-weight: 700;
        color: var(--color-primary);
        background: var(--color-secondary);
        border-top-right-radius: 23px;
        border-top-left-radius: 23px;
        box-shadow: 0px 1px 1px #8080808c;
    }
}

@keyframes shrink-bounce {
    0% {
        transform: scale(1);
    }
    33% {
        transform: scale(.85);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes checkbox-check {
    0% {
        width: 0;
        height: 0;
        border-color: #b0b0b0;
        transform: translate3d(0, 0, 0) rotate(45deg);
    }
    33% {
        width: .2em;
        height: 0;
        transform: translate3d(0, 0, 0) rotate(45deg);
    }
    100% {
        width: 0.7em;
        height: 1.3em;
        border-color: #e9e9e9;
        filter: drop-shadow(1px -2px 1.5px black);
        transform: translate3d(0, -.5em, 0) rotate(45deg);
    }
}
fieldset {
    border: 1px var(--color-light-blue) solid;
    border-radius: 30px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .dashboard-btn {
        padding: 10px;
        height: calc((300px - 70px) / 8); /* Stack vertically on mobile */
    }

    .dashboard-btn i {
        font-size: 1.2rem;
    }

    .dashboard-btn span {
        font-size: 0.7rem;
    }

    .dashboard-btn-group {
        flex-direction: column;
        gap: 5px;

        .dashboard-btn {
            padding: 8px;
            font-size: 0.65rem;

            i {
                font-size: 1rem;
            }

            span {
                font-size: 0.6rem;
            }
        }
    }

    .chart-container {
        height: 300px;
    }

    .form-control, .form-select {
        font-size: 0.8rem;
    }

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

    .attendance-totals h6 {
        font-size: 0.8rem;
    }

    .attendance-totals p {
        font-size: 0.7rem;
    }

    .attendance-table th, .attendance-table td {
        font-size: 0.8rem;
        padding: 6px;
    }

    .report-table th, .report-table td {
        font-size: 0.8rem;
        padding: 4px;
    }

    h2.dashboard-title {
        font-size: 1.2rem;
        letter-spacing: 1.5px;
    }

}

@media print {
    .navbar, .dashboard-btn, .chart-container, .btn {
        display: none !important;
    }

    .logo-container {
        display: block !important;
        text-align: center;
    }

    .modal-content {
        border: none;
        box-shadow: none;
    }

    .modal-body {
        padding: 0;
    }

    .report-table th, .report-table td {
        border: 1px solid #000;
        font-size: 0.7rem;
        padding: 3px;
    }
}

#toast-container {
    position: fixed;
    top: 145px;
    right: 25px;
    z-index: 9999;
    border-radius: 0;

    &.success {
        display: flex;
        background: green;
        color: white;

        &:before {
            content: "";
            position: relative;
            background: url("../assets/images/check-lg.svg") no-repeat center;
            background-size: contain;
            width: 45px;
            height: 45px;
            margin: 15px;
            opacity: 0.3;
        }
    }

    &.danger {
        display: flex;
        background: darkred;
        color: white;

        &:before {
            content: "";
            position: relative;
            background: url("../assets/images/x-lg.svg") no-repeat center;
            background-size: contain;
            width: 45px;
            height: 45px;
            margin: 15px;
            opacity: 0.3;
        }
    }
}

#learner-enrollment-form {
    td > label {
        display: none;
    }


    @media (max-width: 768px) {
        td > label {
            display: block;
            margin-bottom: 0;
            font-size: 0.8em;
            padding-left: 10px;
        }
        .signature-table {
            tr {
                display: flex;
                flex-wrap: wrap;
                width: 100%;
            }
            td {
                display: table-row;
                width: 100%;
                .signature-pad {
                    max-width: unset;
                    width: 352px;
                    max-height: unset;
                    height: 82px;
                }
            }
        }
    }
}
.enrolment-form-item {

}
input:required,
select:required,
textarea:required {
    border: 2px solid red; /* Example: Red border for required fields */
    background-color: #fffafa; /* Example: Light background color */
}

/* Styles for valid required fields (after user input) */
input:required:valid {
    border-color: green; /* Example: Green border for valid required fields */
}

/* Styles for invalid required fields (before or after user input) */
input:required:invalid {
    border-color: orange; /* Example: Orange border for invalid required fields */
}

/* Using a class for specific labels */
.required-label::after {
    content: " *"; /* Adds a red asterisk after the label text */
    color: red;
}

/* Targeting labels associated with required inputs directly */
label[for]:has(+ input:required)::after {
    content: " *";
    color: red;
}