/* Basics */
body {
    margin: 0rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: fit-content;
    height: 100vh;
    font-family: 'Bai Jamjuree', sans-serif;
    font-size: medium;
}

.page-header {
    flex: 0 0 auto;
}

.page-content {
    overflow-y: auto;
    flex: 1 1 auto;
}

/* Sizes */
.fit-content {
    width: fit-content;
}

.width-100 {
    width: 100%;
}

/* Layout */
.layout-panel {
    border: thin solid lightgray;
    border-radius: var(--prevex-border-radius);
    padding: 2rem;
}

.panel-header,
.layout-panel h2 {
    margin: unset;
    margin-bottom: 1.5rem;
    font-weight: 400;
    font-size: 1.4rem;

    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.error-panel {
    border-color: red;
}

.warning-panel {
    border-color: orange;
}

.checkout-content .warning-panel h2 {
    margin: unset;
}

.error-panel ul,
.warning-panel p {
    margin-bottom: unset;
}

/* Icons */
.prevex-icon {
    height: 1.3rem;
}

.prevex-icon-large {
    height: 3rem;
}


/* Links */
.page-content a {
    text-decoration: none;
}

.prevex-link {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.prevex-link:hover {
    text-decoration: underline;
}

.blue-link {
    color: #07d;
}

.blue-link:hover {
    text-decoration: underline;
    cursor: pointer;
}

/* Fonts & typography*/
@font-face {
    font-family: 'Komu';
    src: url('/static/fonts_new/Komu_A.otf');
}

body button,
input,
select,
textarea {
    font-family: 'Bai Jamjuree', sans-serif;
    font-size: medium;
}

h1 {
    font-family: Komu;
    font-weight: 400;
    font-size: 2.5rem;
}

.font-500 {
    font-weight: 500;
}

.font-larger {
    font-size: larger;
}

.text-left {
    text-align: left;
}

.text-centered {
    text-align: center;
}

.nowrap {
    white-space: nowrap;
}

/* Buttons & Input */
.prevex-button {
    border: thin solid lightgray;
    border-radius: var(--prevex-border-radius);
    height: 2.2rem;
    width: 15rem;
    background-color: unset;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.prevex-button:hover:not([disabled]) {
    background: var(--prevex-hover-gray);
    cursor: pointer;
}

.prevex-basic-btn {
    border: thin solid var(--prevex-light-gray);
    border-radius: var(--prevex-border-radius);
    background: #fff;
    color: black;
    padding: 6px 12px;
    font-size: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.prevex-basic-btn:hover {
    background: #bbb;
}


.red-button {
    color: white;
    background: var(--prevex-red);
}

.red-button:hover {
    background: var(--prevex-red-highlighted);
}

.red-button:disabled {
    background: lightgray;
    cursor: unset;
}

.prevex-label-s {
    font-size: 0.8rem;
}

.prevex-select,
.prevex-input[type="text"],
.prevex-input[type="number"],
.prevex-input[type="search"],
.prevex-input[type="tel"],
.prevex-input[type="date"],
.prevex-input[type="password"],
.prevex-input > input[type="text"],
.prevex-input > input[type="password"],
.prevex-input > input[type="email"] {
    box-sizing: border-box;

    padding: 0 0.5rem;

    border: thin solid lightgray;
    border-radius: var(--prevex-border-radius);

    height: 2.2rem;
    width: 15rem;
}

textarea.prevex-input {
    resize: none;
    height: 5rem;
    border-color: lightgray;
    border-radius: var(--prevex-border-radius);
    padding: 0.2rem 0.5rem;
}

input[type='checkbox'] {
    width: 1rem;
    height: 2rem;
    margin: unset;
}


.cursor-default {
    cursor: default;
}

.pointer {
    cursor: pointer;
}

/* Tables */
table.article-table {
    width: 100%;
    border-spacing: 0;
}

.article-table th,
.article-table td {
    text-align: left;
}

.article-table th,
.article-table td {
    padding: 0.75rem 0;
}

.article-table th:last-child,
.article-table td:last-child {
    text-align: right;
}

.article-table td {
    border-bottom: thin solid lightgray;
}

.article-table tr:last-child > td {
    border: none;
}

.article-table-summary {
    text-align: right;
    background: var(--prevex-gray);
    padding: 0.5rem;
    border-radius: var(--prevex-border-radius);
}

table.article-table-sm {
    width: 100%;
    border-spacing: 0;
}

.article-table-sm td {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.3rem 0.5rem;
    padding: 1rem 0;
    border-bottom: thin solid lightgray;
}


.article-table-sm tr:last-child > td {
    border: none;
}

/* Colors */
.color-red {
    color: red;
}

.color-prevex-red {
    color: var(--prevex-red);
}

/* Spinner */
#spinner {
    position: fixed;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: space-around;
}

.lds-dual-ring {
    display: inline-block;
    width: 80px;
    height: 80px;
}

.lds-dual-ring:after {
    content: " ";
    display: block;
    width: 64px;
    height: 64px;
    margin: 8px;
    border-radius: 50%;
    border: 6px solid #fff;
    border-color: black transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* Margins */
.margin-top-1 {
    margin-top: 1rem;
}

.margin-top-15 {
    margin-top: 1.5rem;
}

.margin-bottom-1 {
    margin-bottom: 1rem;
}

.margin-centered {
    margin-left: auto;
    margin-right: auto;
}

.margin-unset {
    margin: unset;
}

.margin-side-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Printing */
@media print {
    .page-header {
        display: none;
    }

    .page-content {
        overflow-y: unset;
    }
}


/* Responsive */

/* Small */
@media (max-width: 767px) {
    .d-sm-none {
        display: none !important;
    }

    .layout-panel {
        padding: 1rem;
    }

    .page-content {
        width: 100vw;
    }
}

/* Medium */
@media (min-width: 768px) and (max-width: 991px) {
    .d-md-none {
        display: none !important;
    }

    .layout-panel {
        padding: 1rem;
    }
}

/* Large */
@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }
}

.catalog-std-table {
    width: 100%;
    text-align: left;
    max-height: 70vh;
}

.catalog-std-table th, .catalog-std-table td {
    padding: 8px;
    line-height: 2;
    position: relative;
}

.catalog-std-table th > span {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-block;
}

.catalog-std-table tr td a {
    color: black;
    text-decoration: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0 7px;
}

.catalog-std-table tr td a span {
    font-size: inherit;
}


/* Style for even rows in the tbody */
.catalog-std-table tbody tr:nth-child(odd) {
    background-color: #fff;
}

/* Style for odd rows in the tbody */
.catalog-std-table tbody tr:nth-child(even) {
    background-color: #eee; /* Odd rows with grey background */
}

/* Apply border-radius to the first and last td in odd rows */
.catalog-std-table tbody tr td:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.catalog-std-table tbody tr td:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.prevex-small-action-btn-container {
    width: fit-content;
    border: 1px solid grey;
    padding: 3px 8px;
    border-radius: 1rem;
    text-decoration: none;
}

.prevex-small-action-btn-container:hover {
    background-color: lightgrey;
    border: 1px solid black;
}

.prevex-small-action-btn-container a {
    color: black;
    margin-left: 3px;
}