@import url('./palette.css');

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

* {
    line-height: 1.5;
    box-sizing: border-box;
}

body, html {
    margin: 0;
    font: 18px Arial, sans-serif;
    overflow-x: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

select, input, button {
    outline: none;
    width: 100%;
    height: 40px;
    padding: 0 15px;
    font-size: 17.5px;
    border: 1px solid var(--border-color);
    border-radius: var(--default-border-radius);
    transition: all .1s ease;
}

select:focus, input:focus {
    border-color: var(--color-dark-gray);
}

select {
    cursor: pointer;
}

button {
    cursor: pointer;
    width: auto;
}

button:hover {
    background-color: var(--color-primary);
    color: #fff;
}

button:active {
    background-color: var(--color-dark-gray);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h4:first-child {
    margin-top: 0;
}

.mb-3 {
    margin-bottom: 15px;
}

.text-center {
    text-align: center;
}

.float-right {
    float: right;
}

.alert {
    padding: 10px 15px;
    width: 100%;
    color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--default-border-radius);
}

.alert-danger {
    color: var(--color-danger);
    background-color: var(--bg-color-danger);
}

.alert-success {
    color: var(--color-success);
    background-color: var(--bg-color-success);
}

.masked {
    z-index: 10000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.masked_loading {
    z-index: 10001;
    position: fixed;
	top: 50%;
	left: 50%;
    margin: -2em 0 0 -1.75em;
    width: 3.75em;
	height: 3.75em;
    animation: rotate 2.75s linear infinite;
}

.masked_loading circle {
    stroke: #878787;
    stroke-linecap: round;
    animation: dash 1.75s ease-in-out infinite;
}

body:has(.modal), html:has(.modal) {
    overflow: hidden;
}

.modal-bg {
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 625px;
    border-radius: 10px;
    background-color: #fff;
    transform: translate(-50%, -50%);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 17.5px;
    padding: 15px var(--modal-body-padding);
    border: solid var(--border-color);
    border-width: 0 0 1px 0;
}

.modal-title {
    font-size: 18.5px;
    font-weight: 600;
}

.modal-close {
    cursor: pointer;
    position: relative;
    width: 25px;
    height: 25px;
    transition: opacity .15s ease .01s;
}

.modal-close:hover {
    opacity: 0.8;
}

.modal-close:active {
    opacity: 0.6;
}

.modal-close__left, .modal-close__right {
    position: absolute;
    top: 1px;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: gray;
    transform: rotate(-45deg);
}

.modal-close__right {
    transform: rotate(45deg);
}

.modal-body {
    padding: var(--modal-body-padding);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-body p:first-child {
    margin-top: 0;
}

.modal-body p:last-child {
    margin-bottom: 0;
}
