/****************************
Global
****************************/

:root {
    --black: #231F20;
    --lavender: #CEDAF0;
    --primary: #DB7CB2;
    --gray: #747474;
    --light-gray: #E6E6E6;
}

*,
::before,
::after {
    box-sizing: border-box;
    font-feature-settings: "lnum" 1;
}


body {
    color: var(--black);
    font-family: "Open Sans", sans-serif;
    margin: 0;
    background-color: #F4F7F9;
}

body.noScroll {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

input,
button,
select,
textarea,
optgroup {
    background-color: transparent;
    border: none;
    color: inherit;
    display: block;
    font: inherit;
    margin: 0;
    text-align: left;
    width: 100%;
}

input,
select,
textarea {
    padding: 5px 10px;
    border: 1px solid var(--light-gray);
    border-bottom: 4px solid var(--light-gray);
    transition: 0.3s;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
}

button {
    cursor: pointer;
}

textarea {
    resize: none;
}

img,
picture,
video {
    display: block;
    height: auto;
    width: 100%;
}

dialog {
    background-color: rgba(0, 0, 0, 0);
    border: none;
    display: none;
    height: 100%;
    left: 0;
    max-height: none;
    max-width: none;
    padding: 0;
    position: fixed;
    top: 0;
    width: 100%;
}

dialog[open] {
    display: flex;
}

dialog::backdrop {
    animation: backdrop-vanish 0.3s ease;
    background-color: rgba(0, 0, 0, 0);
}

dialog[open]::backdrop {
    background-color: rgba(0, 0, 0, 0.3);
}

@keyframes backdrop-vanish {
    from {
        background-color: rgba(0, 0, 0, 0);
    }
    to {
        background-color: rgba(0, 0, 0, 0.3);
    }
}

/****************************
Button
****************************/

.button {
    appearance: none;
    background-color: var(--primary);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: block;
    font-size: 18px;
    font-weight: 700;
    padding: 10px 25px;
    text-align: center;
    text-transform: uppercase;
    transition: .3s ease;
    width: 100%;
}

.button.center {
    margin: auto;
}

.button.loading {
    color: transparent;
    pointer-events: none;
    position: relative;
}

.button.loading::after {
    animation: loading 1s ease infinite;
    border: 4px solid transparent;
    border-radius: 50%;
    border-top-color: #FFF;
    bottom: 0;
    content: "";
    height: 22px;
    left: 0;
    margin: auto;
    position: absolute;
    right: 0;
    top: 0;
    width: 22px;
}

@keyframes loading {
    from {
        transform: rotate(0turn);
    }

    to {
        transform: rotate(1turn);
    }
}

/****************************
Rich Text Editor (RTE)
****************************/

.rte h1,
.rte h2,
.rte h3,
.rte h4,
.rte h5,
.rte h6,
.rte p {
    font-size: revert;
    font-weight: revert;
    margin: revert;
}

/****************************
Container
****************************/

.container {
    max-width: 1200px;
    margin: auto;
}


/****************************
Main
****************************/

main {
    padding: 20px;
}

.card {
    font-size: 14px;
    background-color: white;
    box-shadow: 0 0 20px rgb(8 21 66 / 5%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
}

.card.scroll {
    overflow-x: auto;
}

.cardTitle {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
}

.cardBody {
    font-size: 16px;
    line-height: 1.6;
}

@media (max-width: 800px) {
    .card {
        padding: 20px;
    }
}


/****************************
Table
****************************/

.table {
    width: 100%;
    margin-bottom: 20px;
}

.table thead {
    font-weight: 800;
    position: sticky;
    top: 0;
    background-color: white;
}

.table tbody tr {
    transition: 0.3s;
}

.table tbody tr:nth-of-type(odd) {
    background-color: #ECF1F5
}

.table tbody tr:nth-of-type(even) {
    background-color: #F4F7F9
}

.table tbody tr:hover {
    background-color: #f3ece8;
    cursor: pointer;
}

.table td {
    padding: 10px;
    white-space: nowrap;
    font-size: 16px;
}

.table td a {
    text-decoration: underline;
}

/****************************
Web component for <file-uploader>
 */

file-uploader {
    position: relative;
    display: block;
    padding: 10px;
    border: 1px solid var(--light-gray);
}

file-uploader.loading {
    pointer-events: none;
    opacity: 0.5;
}

file-uploader.loading::after {
    content: "";
    position: absolute;
    width: 50px;
    height: 50px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 7px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: loading 1s ease infinite;
}

.fileUploaderLabel {
    margin-bottom: 5px;
    display: block;
}

.fileUploaderEmpty {
    margin-bottom: 5px;
    display: block;
    font-size: 12px;
}

.fileUploadImage,
.fileUploadVideo {
    max-width: 200px;
    border: 4px dashed lightgray;
    margin-bottom: 8px;
}

.fileUploadButton {
    background-color: var(--primary);
    width: fit-content;
    padding: 5px 15px;
    font-size: 12px;
    color: white;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
}

/****************************
Swal
 */

.swal2-select {
    width: auto;
}