/*--- Modal ---*/
.md-box {
    position: fixed;
    z-index: 999;
    left:0;
    top:0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.50);
    user-select: none;
}

.md-content {
    position: relative;
    padding: 20px;
    max-width: 420px;
    min-width: 240px;
    border-radius: 20px;
    background-color: var(--bg-tile);
    border: 1px solid var(--font-gray);
    pointer-events: auto;
}

.md-header {
    margin: 30px 0;
    padding: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--font-primary);
    text-align: center;
}
.md-info {
    margin: 0 0 30px 0;
    padding: 0 15px;
}
.md-info p {
    margin: 0;
    padding: 0;
    color: var(--font-gray);
    font-size: 16px;
    text-align: center;
}

@media only screen and (max-width: 400px) {
    .md-box {
        padding: 0 10px;
    }
    .md-content {
        padding: 12px;
    }
    .md-header {
        margin: 20px 0;
    }

}
/*--- end: Modal ---*/
/*--- Success Modal ---*/
.md-success-box {
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: none;
    justify-content: center;
    align-items: flex-start;
    user-select: none;
}

.md-success-toast {
    position: relative;
    margin: 20px 0 0 0;
    padding: 20px;
    max-width: 420px;
    min-width: 280px;
    border-radius: 20px;
    background-color: var(--bg-tile);
    border: 1px solid var(--font-gray);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-150%);
    transition: transform 0.3s ease-in-out;
}

/* Модалка видима, но блок всё ещё спрятан сверху */
.md-success-box.show {
    display: flex;
}

/* начальное положение */
.md-success-box.show .md-success-toast {
    transform: translateY(-150%);
}

/* блок выезжает */
.md-success-box.animate-in .md-success-toast {
    transform: translateY(0);
}

/* блок скрывается */
.md-success-box.hide-toast .md-success-toast {
    transform: translateY(-150%);
}

/* иконка и заголовок */
.md-success-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--font-primary);
}
.md-success-header-icon {
    width: 36px;
    height: 36px;
    color: var(--font-primary);
}
.md-success-header-icon svg {
    width: 36px;
    height: 36px;
    vertical-align: middle;
    stroke: currentColor;
}
.md-success-header-title {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--font-primary);
}

@media only screen and (max-width: 400px) {
    .md-success-toast {
        padding: 16px;
    }
}

/*--- end: Success Modal ---*/

/*----- Content ------*/
.content-section {
    max-width: 480px;
    margin: 0 0 20px 0;
    padding: 32px 30px;
    border-radius: 20px;
    background-color: var(--bg-tile);
    box-shadow: 3px 3px 15px rgba(0,0,0,0.15);
}

.content-line {
    margin: 0 0 20px 0;
}
.content-line-label {
    color: var(--font-gray); font-size: 16px; font-weight: 400; text-align: left;
}
.content-line-status {
    color: var(--font-primary); font-size: 16px; font-weight: 600; text-align: left;
}

/*--- Button Group ---*/
.btn-group { display: flex; justify-content: flex-start; align-items: center; gap: 12px; padding: 12px 0; }
.btn-group-modal { display: flex; justify-content: flex-start; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; }

@media only screen and (max-width: 500px) {
    .btn-group { flex-direction: column; align-items: flex-start; }
}

/*---- Базовая кнопка ---*/
.base-btn,
.base-btn:link,
.base-btn:visited,
.base-btn:hover,
.base-btn:active {
    display: inline-block;
    padding: 15px 30px;
    min-width: 200px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--font-gray);
    text-align: center;
    border: 1px solid var(--font-gray);
    border-radius: 30px;
    background: var(--bg-tile);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.15);
}

/*--- Модальная кнопка ---*/
.modal-btn,
.modal-btn:link,
.modal-btn:visited,
.modal-btn:hover,
.modal-btn:active {
    display: inline-block;
    padding: 15px 30px;
    min-width: 130px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--font-gray);
    text-align: center;
    border: 1px solid var(--font-gray);
    border-radius: 30px;
    background: var(--bg-tile);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.15);
}

/*--- Кнопка "Accept/Yes" в модалке ---*/
.modal-btn.accept {
    font-size: 17px;
    font-weight: 600;
    color: var(--font-color);
    border: none;
    background: var(--bg-btn);
}

/*---- LOADER ---*/
/* loader overlay */
.overlay-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

/* loader spin */
.spinner-border {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    border: 0.25em solid var(--font-color);
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

/* Анимация вращения */
@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Визуально скрытый текст для скринридеров */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/*----- end: Content ------*/