/* * *******************************************************************************
*
* MyTutor custom styles
* @copyright 2024 www.axus.lk
* @author Sarada Bhagya
* https://github.com/AXUSLK
*
*
*      01. Checkbox and Radio Button
*      02. Input Required
*      03. Error Alert for list
*      04. Animated Progress Bars
*      05. DatePicker
*      06. Tutor Dashboard
*      00. Other All
*
*
* ******************************************************************************/
/*  01. Checkbox and Radio Button */
.widget {
	margin:0;
	span {
		display: inline-block;
		margin-right: 2rem;
	}
}
/* Radio Button styles */
.radio input[type="radio"]:checked,
.radio input[type="radio"]:not(:checked) {
	position: absolute;
	visibility: hidden;
	& + label {
		position: relative;
		padding-left: 1.725rem;
		cursor: pointer;
		display: inline-block;
		line-height: 20px;
		&:before {
			content: '';
			position: absolute;
			left: 0;
			top: 0;
			width: 18px;
			height: 18px;
			border: 1px solid rgba(0,0,0,0.2);
			border-radius: 100%;
			background: #fff;
		}
		&:after {
			content: '';
			width: 12px;
			height: 12px;
			background: green;
			position: absolute;
			top: 4px;
			left: 4px;
			border-radius: 100%;
			-webkit-transition: all 0.2s ease;
			transition: all 0.2s ease;
		}
	}
}

input[type="radio"]:not(:checked) + label:after {
  opacity: 0;
  -webkit-transform: scale(0);
  transform: scale(0);
}
input[type="radio"]:checked + label:after {
  opacity: 1;
  -webkit-transform: scale(1);
  transform: scale(1);
}


/* Checkbox Button styles */
.checkbox input[type="checkbox"]:checked,
.checkbox input[type="checkbox"]:not(:checked) {
	position: absolute;
	visibility: hidden;
	& + label {
		position: relative;
		padding-left: 1.725rem;
		cursor: pointer;
		display: inline-block;
		&:before {
			content: '';
			position: absolute;
			left: 0;
			top: 0;
			width: 16px;
			height: 16px;
			border: 1px solid rgba(0,0,0,0.2);
			background: #fff;
		}
		&:after {
			content: '';
			width: 10px;
			height: 10px;
			background: green;
			position: absolute;
			top: 4px;
			left: 4px;
			-webkit-transition: all 0.2s ease;
			transition: all 0.2s ease;
		}
	}
}
input[type="checkbox"]:not(:checked) + label:after {
	opacity: 0;
	-webkit-transform: scale(0);
	transform: scale(0);
}
input[type="checkbox"]:checked + label:after {
	opacity: 1;
	-webkit-transform: scale(1);
	transform: scale(1);
}

/* Checkbox Switch styles */
.switch input[type="checkbox"],
.switch input[type="radio"]{
	display:none;
	& + label {
		width: 50px;
		height: 25px;
		border-radius: 25px;
		border: 2px solid #333;
		background-color: red;
		display: inline-block;
		content: "";
		margin-right: 5px;
		transition: background-color 0.5s linear;
		line-height: 2;
		&:hover {
			cursor: pointer;
		}
		&:before {
			width: 25px;
			height: 25px;
			border-radius: 30px;
			background-color: #EEE;
			display: block;
			content: "";
			float: left;
			margin-right: 5px;
			transition: margin 0.2s linear, background-color 0.2s linear;
			box-shadow: 0px 0px 5px #AAA;
		}
	}
	&:checked + label {
		background-color: green;
		&:before {
			margin: 0 0 0 25px;
			background-color: #EEE;
		}
	}
}

/*  02. Input Required */
span.required {
    padding-left: 0.3rem;
    font-style: normal;
    color: #dd0430;
    font-weight: 400;
}

/*  03. Error Alert for list */
.alert-danger ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem; /* Add padding to create space for dot icon */
    position: relative;
}

.alert-danger ul li::before {
    content: '\2022'; /* Unicode character for bullet point */
    color: #721c24; /* Match text color */
    position: absolute;
    left: 0;
}

/*  04. Animated Progress Bars */
@property --progress-value {
    syntax: '<integer>';
    inherits: true;
    initial-value: 0;
}

:root {
    --progress-bar-color: #cfd8dc;
    --progress-value-color: #2196f3;
    --progress-empty-color-h: 4.1;
    --progress-empty-color-s: 89.6;
    --progress-empty-color-l: 58.4;
    --progress-filled-color-h: 122.4;
    --progress-filled-color-s: 39.4;
    --progress-filled-color-l: 49.2;
}

/* html,
body {
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

body {
    justify-content: space-evenly;
    max-height: 300px;
    width: 100%;
    max-width: 400px;
    font-family: 'Roboto Mono', monospace;
} */

progress[value] {
    display: block;
    position: relative;
    appearance: none;
    width: 100%;
    height: 48px;
    /* border: 0; */
    border-right: 2px solid #22C55E !important;
    border-left: 2px solid #22C55E !important;
    --border-radius: 0px 0px 4px 4px;
    border-radius: var(--border-radius);
    counter-reset: progress var(--progress-value);
    --progress-value-string: counter(progress) '%';
    --progress-max-decimal: calc(var(--value, 0) / var(--max, 0));
    --progress-value-decimal: calc(var(--progress-value, 0) / var(--max, 0));

    @supports selector(::-moz-progress-bar) {
        --progress-value-decimal: calc(var(--value, 0) / var(--max, 0));
    }

    --progress-value-percent: calc(var(--progress-value-decimal) * 100%);
    --progress-value-color: hsl(calc((var(--progress-empty-color-h) + (var(--progress-filled-color-h) - var(--progress-empty-color-h)) * var(--progress-value-decimal)) * 1deg) calc((var(--progress-empty-color-s) + (var(--progress-filled-color-s) - var(--progress-empty-color-s)) * var(--progress-value-decimal)) * 1%) calc((var(--progress-empty-color-l) + (var(--progress-filled-color-l) - var(--progress-empty-color-l)) * var(--progress-value-decimal)) * 1%));
    animation: calc(3s * var(--progress-max-decimal)) linear 0.5s 1 normal both progress;
}

progress[value]::-webkit-progress-bar {
    background-color: var(--progress-bar-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

progress[value]::-webkit-progress-value {
    width: var(--progress-value-percent) !important;
    background-color: var(--progress-value-color);
    border-radius: var(--border-radius);
}

progress[value]::-moz-progress-bar {
    width: var(--progress-value-percent) !important;
    background-color: var(--progress-value-color);
    border-radius: var(--border-radius);
}

progress[value]::after {
    display: flex;
    align-items: center;
    justify-content: center;
    --size: 52px;
    width: var(--size);
    height: var(--size);
    position: absolute;
    left: var(--progress-value-percent);
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--progress-value-color);
    border-radius: 5% !important;
    content: attr(value);
    content: var(--progress-value-string, var(--value));
    font-size: 32px;
    font-weight: 900;
    padding: 2rem 4rem;
    color: #fff;
    -webkit-border-radius: 5% !important;
    -moz-border-radius: 5% !important;
    -ms-border-radius: 5% !important;
    -o-border-radius: 5% !important;
}

@keyframes progress {
    from {
        --progress-value: 0;
    }

    to {
        --progress-value: var(--value);
    }
}


/*  05. DatePicker  */
[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/*  06. Tutor Dashboard  */
.header-box {
    padding: 2rem;
    background: #e2e2e2;
    border: 2px #3d3d3d solid;
    border-radius: 10px;
}

.tu-authorinfo {
    border-radius: 10px;
}

.tu-authordetail .fa-solid {
    font-size: 32px;
}

.tu-box figure img {
    width: 294px;
}

.tu-cards {
    padding: 2rem;
    margin: 2rem 0 0 0;
}

.tu-cards figure {
    display: grid;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.tu-cards figure img {
    transition: transform 0.4s;
}

.tu-cards figure figcaption {
    display: grid;
    align-items: end;
    font-family: sans-serif;
    text-align: center;
    font-size: 2.3rem;
    font-weight: bold;
    line-height: 3.5rem;
    color: #fff;
    padding: .75rem;
    background: var(--c, #0009);
    position: absolute;
    inset: 0;
    transition: opacity 0.4s;
}

.tu-cards figure figcaption h3{
    color: #fff;
    line-height: 3.5rem;
}

.tu-cards figure figcaption figcaption-icon{
    color: #22C55E !important;
}

.tu-cards figure:hover figcaption {
    opacity: 0;
}

.tu-cards figure:hover img {
    transform: scale(1.2);
}

/*  00. Other All  */
.delete-item{
    cursor: pointer;
}

.tu-navbar .navbar-brand {
    padding: 0px !important;
    margin: 0;
    display: block;
    max-width: 200px !important;
}


.user-info {
    display: flex;
    align-items: center;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-name {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}
