.button.disabled,
.button[disabled] {
    pointer-events: none;
    background-color: #a0a0a0 !important; /* Gray out */
    color: #ddd;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.button.disabled:before,
.button[disabled]:before {
    background-color: transparent;
    width: 0 !important;
}

.button.disabled span:nth-of-type(1),
.button[disabled] span:nth-of-type(1) {
    opacity: 0.6;
}

.button.disabled span:nth-of-type(2),
.button[disabled] span:nth-of-type(2) {
    display: none;
}

.button.disabled span:nth-of-type(3),
.button[disabled] span:nth-of-type(3) {
    display: none;
}

.button.disabled span:nth-of-type(4),
.button[disabled] span:nth-of-type(4) {
    display: none;
}

.button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 12.5rem;
    margin: 0;
    padding: 1.5rem 3.125rem;
    background-color: #3498db;
    border: none;
    border-radius: 0.3125rem;
    box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.2);
    color: white;
    font-weight: 300;
    text-transform: uppercase;
    overflow: hidden;
}

.button:before {
    position: absolute;
    content: '';
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #54d98c;
}

.button span {
    position: absolute;
    line-height: 0;
}

.button span i {
    transform-origin: center center;
}

.button span:nth-of-type(1) {
    top: 50%;
    transform: translateY(-50%);
}

.button span:nth-of-type(2) {
    top: 100%;
    transform: translateY(0%);
    font-size: 24px;
}

.button span:nth-of-type(3) {
    display: none;
}

.button span:nth-of-type(4) {
    display: none;
}

.activeLoad {
    background-color: #2ecc71;
}

.activeLoad:before {
    width: 100%;
    transition: width 3s linear;
}

.activeLoad span:nth-of-type(1) {
    top: -100%;
    transform: translateY(-50%);
}

.activeLoad span:nth-of-type(2) {
    top: 50%;
    transform: translateY(-50%);
}

.activeLoad span:nth-of-type(2) i {
    animation: loading 500ms linear infinite;
}

.activeLoad span:nth-of-type(3),
.activeLoad span:nth-of-type(4) {
    display: none;
}

.finished {
    background-color: #54d98c;
}

.finished .submit {
    display: none;
}

.finished .loading {
    display: none;
}

.finished .check {
    display: block !important;
    font-size: 24px;
    animation: scale 0.5s linear;
}

.finished .check i {
    transform-origin: center center;
}

/* Error state */
.error-state {
    background-color: #e74c3c !important;
}

.error-state .submit,
.error-state .loading,
.error-state .check {
    display: none;
}

.error-state .error {
    display: block !important;
    font-size: 24px;
    animation: scaleError 0.5s linear;
}

.error-state .error i {
    color: #fff;
    transform-origin: center center;
}

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

@keyframes scale {
0% {
    transform: scale(10);
}
50% {
    transform: scale(0.2);
}
70% {
    transform: scale(1.2);
}
90% {
    transform: scale(0.7);
}
100% {
    transform: scale(1);
}
}

@keyframes scaleError {
0% {
    transform: scale(10);
}
50% {
    transform: scale(0.2);
}
70% {
    transform: scale(1.2);
}
90% {
    transform: scale(0.7);
}
100% {
    transform: scale(1);
}
}

td[contenteditable] {
    background-color: #f0f8ff;
    border-bottom: 1px solid #007bff;
    outline: 1px solid #007bff;
}

.selectize-control {
    width: 100% !important;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.selectize-input {
    height: 100%;
    border-radius: 0;
}

.highlight {
    background-color: #C5651D ;
    animation: flashsuccess 1s ease-in-out;
}

@keyframes flashsuccess {
0% { background-color: #C5651D ; }
50% { background-color: transparent; }
100% { background-color: #C5651D }
}
.highlight_error {
    background-color: red ;
    animation: flasherror 1s ease-in-out;
}

@keyframes flasherror {
0% { background-color: red ; }
50% { background-color: transparent; }
100% { background-color: red }
}

