.tmpcoder-common-loader[hidden] {
    display: none !important;
}

.tmpcoder-common-loader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(240, 245, 250, 0.82);
}

.tmpcoder-common-loader__card {
    width: 100%;
    max-width: 360px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    border-radius: 10px;
    padding: 18px 20px;
    text-align: center;
}

.tmpcoder-common-loader__spinner {
    width: 26px;
    height: 26px;
    margin: 0 auto 12px;
    border-radius: 999px;
    border: 2px solid #dbe3ee;
    border-top-color: #5729d9;
    display: block;
    animation: tmpcoderCommonLoaderSpin 0.8s linear infinite;
}

.tmpcoder-common-loader__title {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 600;
}

.tmpcoder-common-loader__desc {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

@keyframes tmpcoderCommonLoaderSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Global fonts popup variant: keep same spinner design, center inside popup content */
.tmpcoder-condition-popup .set-global-loader {
    position: static;
    inset: auto;
    z-index: auto;
    width: 100%;
    min-height: 120px;
    background: transparent;
}

.tmpcoder-condition-popup .set-global-loader .tmpcoder-common-loader__card {
    max-width: 280px;
    box-shadow: none;
    border: 0;
    padding: 10px 8px;
}

.tmpcoder-condition-popup .set-global-loader .tmpcoder-common-loader__title:empty,
.tmpcoder-condition-popup .set-global-loader .tmpcoder-common-loader__desc:empty {
    display: none;
}

.tmpcoder-condition-popup .set-global-loader .tmpcoder-common-loader__spinner {
    margin-bottom: 0;
}

/* Template conditions popup: spinner only (no loader card/text box) */
.tmpcoder-condition-popup .tmpcoder-template-conditions-loader:not([hidden]) {
    position: static;
    inset: auto;
    z-index: auto;
    width: 100%;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transform: none;
    top: auto;
    left: auto;
}

.tmpcoder-condition-popup .tmpcoder-template-conditions-loader .tmpcoder-common-loader__card {
    width: auto;
    max-width: none;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.tmpcoder-condition-popup .tmpcoder-template-conditions-loader .tmpcoder-common-loader__title,
.tmpcoder-condition-popup .tmpcoder-template-conditions-loader .tmpcoder-common-loader__desc {
    display: none;
}

.tmpcoder-condition-popup .tmpcoder-template-conditions-loader .tmpcoder-common-loader__spinner {
    margin: 0;
}
