/* sa-table INI */
.sa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: small;
}

.sa-table .to-right {
    text-align: right;
}

.sa-table .blue-cell,
.sa-table .green-cell,
.sa-table .red-cell,
.sa-table .yellow-cell {
    position: relative;
    padding-left: 22px;
    white-space: nowrap;
}

.sa-table .blue-cell:before,
.sa-table .green-cell:before,
.sa-table .red-cell:before,
.sa-table .yellow-cell:before {
    content: "";
    display: block;
    position: absolute;
    left: 6px;
    top: 13px;
    border-radius: 11px;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
}

.sa-table .green-cell:before {
    --bg-color: chartreuse; /* Define background color */
    --border-color: rgba(0, 0, 0, 0.5); /* Define default border color (darker) */
    background-color: var(--bg-color); /* Use background color variable */
    border: 1px solid var(--border-color); /* Use border color variable */
}

.sa-table .blue-cell:before {
    --bg-color: #40B2F7; /* Define background color */
    --border-color: rgba(0, 0, 0, 0.5); /* Define default border color (darker) */
    background-color: var(--bg-color); /* Use background color variable */
    border: 1px solid var(--border-color); /* Use border color variable */
}

.sa-table .red-cell:before {
    --bg-color: #FF2E2E; /* Define background color */
    --border-color: rgba(0, 0, 0, 0.5); /* Define default border color (darker) */
    background-color: var(--bg-color); /* Use background color variable */
    border: 1px solid var(--border-color); /* Use border color variable */
}

.sa-table .yellow-cell:before {
    --bg-color: yellow; /* Define background color */
    --border-color: rgba(0, 0, 0, 0.5); /* Define default border color (darker) */
    background-color: var(--bg-color); /* Use background color variable */
    border: 1px solid var(--border-color); /* Use border color variable */
}


.sa-table .sortable {
    cursor: pointer;
}

.sa-table tbody {
    background-color: white;
}

.sa-table tfoot {
    /*background-color: #eee;*/
}

.sa-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.sa-table th {
    font-weight: normal;
    /*vertical-align: top;*/
    text-align: left;
    line-height: 1.3;

}

.sa-table th {
    background-color: #A52A2A;
    color: white;
    font-weight: 500;
}

.sa-table th,
.sa-table td {
    padding: 6px;
    position: relative;
    /*border-left: 1px solid white;*/
    vertical-align: top;
}

.sa-table td {
    /*word-break: break-word;*/
}

.sa-table .fa {
    vertical-align: middle;
}

.sa-table input {
    /*padding: 3px;*/
    /*width: -webkit-fill-available;*/
    /*margin-top: 4px;*/
}

/*.sa-table td:nth-child(6),*/
.sa-table td:nth-child(6) {
    /*white-space: nowrap;*/
}

/*
.sa-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}
*/

/*
.sa-table .select-all {
    width: 1px;
}
*/

/*
.sa-table .select-all,
.sa-table .update {
    text-align: center;
}
*/

.sa-table a.account {
    font-weight: normal;
}

.sa-table select {
    padding: 3px;
    border: 1px solid #bbb;
}

.sa-table th:first-child,
.sa-table td:first-child {
    /*text-align: center;*/
    /*width: 1px;*/
}

/*
.sortable.active:after {
    position: absolute;
    right: 5px;
    top: 14px;
    transform: translateY(-50%);
    font-size: 10px;
    content: "▲";
    color: #777;
}
*/

.sa-table th.sorted-asc::after {
    position: absolute;
    right: 5px;
    /*bottom: 0px;*/
    top: 14px;
    transform: translateY(-50%);
    font-size: 10px;
    content: " ▲";
    color: #777;
}

/*
.sortable.active.asc:after {
    content: "▼";
}
*/
.sa-table th.sorted-desc::after {

    position: absolute;
    right: 5px;
    /*bottom: 0px;*/
    top: 14px;
    transform: translateY(-50%);
    font-size: 10px;
    content: " ▼";
    color: #777;
}

.sa-table th.sorted-desc,
.sa-table th.sorted-asc {
    padding-right: 16px;
}

/*
.sa-table th.sorted-asc::after {
    content: "▲";
}
*/


.helper {
    cursor: pointer;
    color: cornflowerblue;
}

/*
button {
    cursor: pointer;
    padding: 10px 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f7f7f7;
}

button:hover {
    background: #eee;
}
*/

.demo-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

#global-modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    width: 500px;
    max-width: calc(100% - 32px);
    max-height: calc(100vh - 40px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    margin: auto; /* IMPORTANT so it can work*/
    /*transform: scale(0.96);*/
}

#global-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 80vh;
    background: #fff;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/*
.modal-content p {
    font-size: small;
}
*/

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    padding: 4px 6px;
    cursor: pointer;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-body-scroll {
    overflow-y: auto;
    padding: 20px;
    flex: 1 1 auto;
    min-height: 0;

    /*flex: 1;*/


}

.modal-text {
    margin: 0 0 16px;
    color: #333;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.btn-primary {
    background: #111;
    color: #fff;
    border-color: #111;
}

.btn-primary:hover {
    background: #222;
}

#global-modal[open] {
    animation: modalIn 0.25s ease forwards;
}

#global-modal.closing {
    animation: modalOut 0.2s ease forwards;
}

#global-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
    animation: backdropIn 0.25s ease forwards;
    backdrop-filter: blur(1px);
}

#global-modal.closing::backdrop {
    animation: backdropOut 0.2s ease forwards;
}

/*
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}
*/

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(16px);
    }
}

@keyframes backdropIn {
    from {
        background: rgba(0, 0, 0, 0);
    }
    to {
        background: rgba(0, 0, 0, 0.5);
    }
}

@keyframes backdropOut {
    from {
        background: rgba(0, 0, 0, 0.5);
    }
    to {
        background: rgba(0, 0, 0, 0);
    }
}

/* TODO: Mark all unfinished areas with pink */
.void {
    background: pink;
}