/* =========================================================
   TIMES BANK v6.0 — ВНЕШНИЙ ВИД
   Механика находится в отдельном JS-файле.
   Пока без редизайна: сохранён внешний вид v5.
   ========================================================= */

#times-bank-v60 {
    --tb-bg: rgba(242,249,247,.92);
    --tb-card: rgba(255,255,255,.62);
    --tb-card-soft: rgba(255,255,255,.46);
    --tb-card-result: rgba(104,152,143,.12);
    --tb-text: #273632;
    --tb-border: rgba(90,120,115,.28);
    --tb-border-soft: rgba(75,120,112,.22);
    --tb-accent: #557f77;
    --tb-money: #e8684d;

    margin: 20px 0;
    padding: 18px;
    border: 1px solid var(--tb-border);
    border-radius: 18px;
    background: var(--tb-bg);
    color: var(--tb-text);
    line-height: 1.45;
}

#times-bank-v60 * {
    box-sizing: border-box;
}

#times-bank-v60 h3,
#times-bank-v60 h4,
#times-bank-v60 p {
    margin-top: 0;
}

#times-bank-v60 .tb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

#times-bank-v60 .tb-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

#times-bank-v60 .tb-user {
    font-size: 12px;
    opacity: .72;
}

#times-bank-v60 .tb-status {
    margin: 12px 0;
    padding: 9px 12px;
    border: 1px solid var(--tb-border-soft);
    border-radius: 12px;
    background: rgba(255,255,255,.55);
    font-weight: 600;
}

#times-bank-v60 .tb-overall {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px,1fr));
    gap: 10px;
    margin: 14px 0 18px;
}

#times-bank-v60 .tb-summary-card {
    padding: 13px 14px;
    border: 1px solid var(--tb-border-soft);
    border-radius: 14px;
    background: var(--tb-card);
    text-align: center;
}

#times-bank-v60 .tb-summary-label {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .65;
}

#times-bank-v60 .tb-summary-value {
    font-size: 20px;
    font-weight: 800;
}

#times-bank-v60 .tb-sections {
    display: grid;
    gap: 12px;
}

#times-bank-v60 .tb-section {
    padding: 15px;
    border: 1px solid var(--tb-border-soft);
    border-radius: 16px;
    background: var(--tb-card-soft);
}

#times-bank-v60 .tb-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

#times-bank-v60 .tb-section-title {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

#times-bank-v60 .tb-section-total {
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(91,141,132,.16);
    font-size: 11px;
    font-weight: 700;
}

#times-bank-v60 .tb-rates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 6px 18px;
    margin: 0 0 12px;
    font-size: 12px;
}

#times-bank-v60 .tb-rate {
    display: flex;
    gap: 7px;
    align-items: flex-start;
}

#times-bank-v60 .tb-rate-money {
    flex: 0 0 auto;
    min-width: 42px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--tb-money);
    color: #fff;
    text-align: center;
    font-size: 10px;
    font-weight: 800;
}

#times-bank-v60 button,
.times-bank-modal button {
    cursor: pointer;
    padding: 8px 13px;
    border: 0;
    border-radius: 999px;
    background: var(--tb-accent, #557f77);
    color: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

#times-bank-v60 button:hover:not(:disabled),
.times-bank-modal button:hover:not(:disabled) {
    filter: brightness(.95);
}

#times-bank-v60 button:disabled,
.times-bank-modal button:disabled {
    opacity: .45;
    cursor: default;
}

#times-bank-v60 .tb-calc-row {
    text-align: center;
    margin: 9px 0 3px;
}

#times-bank-v60 .tb-button-loading::before {
    content: "&#9676;";
    display: inline-block;
    margin-right: 6px;
    animation: times-bank-spin 1s linear infinite;
}

#times-bank-v60 .tb-button-done::before {
    content: "&#10003;";
    display: inline-block;
    margin-right: 5px;
}

@keyframes times-bank-spin {
    to {
        transform: rotate(360deg);
    }
}

#times-bank-v60 .tb-result {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--tb-card-result);
}

#times-bank-v60 .tb-result-empty {
    opacity: .65;
    text-align: center;
    padding: 6px 0;
}

#times-bank-v60 table {
    width: 100%;
    border-collapse: collapse;
    margin: 7px 0 11px;
    font-size: 11px;
}

#times-bank-v60 th,
#times-bank-v60 td {
    padding: 5px 7px;
    border-bottom: 1px solid rgba(75,120,112,.15);
    text-align: left;
    vertical-align: top;
}

#times-bank-v60 .tb-result-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(100px,1fr));
    gap: 8px;
    margin-top: 10px;
}

#times-bank-v60 .tb-mini {
    padding: 7px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,.55);
    text-align: center;
}

#times-bank-v60 .tb-mini span {
    display: block;
    font-size: 9px;
    opacity: .62;
    text-transform: uppercase;
}

#times-bank-v60 .tb-mini strong {
    display: block;
    margin-top: 2px;
    font-size: 14px;
}

#times-bank-v60 .tb-send-zone {
    margin-top: 16px;
    padding: 15px;
    border: 1px solid var(--tb-border-soft);
    border-radius: 16px;
    background: var(--tb-card);
    text-align: center;
}

#times-bank-v60 .tb-send-zone button {
    min-width: 220px;
    font-size: 12px;
    padding: 10px 18px;
}

#times-bank-v60 .tb-note {
    margin-top: 8px;
    font-size: 10px;
    opacity: .66;
}

#times-bank-v60 .tb-message {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 12px;
}

#times-bank-v60 .tb-success {
    border: 1px solid rgba(73,130,96,.35);
    background: rgba(115,180,135,.12);
}

#times-bank-v60 .tb-warning {
    border: 1px solid rgba(184,128,64,.35);
    background: rgba(220,178,92,.12);
}

#times-bank-v60 .tb-error {
    border: 1px solid rgba(170,70,70,.35);
    background: rgba(200,90,90,.1);
    color: #8a2323;
    white-space: pre-wrap;
}

#times-bank-v60 .tb-receipt {
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 12px;
    padding: 13px;
    border: 1px dashed rgba(75,120,112,.35);
    border-radius: 12px;
    background: rgba(255,255,255,.68);
    text-align: left;
    font-family: monospace;
    font-size: 11px;
}

#times-bank-v60 details {
    margin-top: 9px;
}

#times-bank-v60 summary {
    cursor: pointer;
    font-weight: 700;
}


/* =========================================================
   СЛУЖЕБНЫЕ ЭЛЕМЕНТЫ
   ========================================================= */

/*
   Служебные iframe существуют только во время операции.
   Пользователь их никогда не видит.
*/

.times-bank-service-frame {
    position: fixed !important;
    left: -10000px !important;
    top: -10000px !important;
    width: 10px !important;
    height: 10px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: 0 !important;
}


/*
   JS добавляет этот класс только тем элементам,
   которые в банковской теме нужно спрятать у обычного
   пользователя:
   - ручную форму ответа;
   - редактирование;
   - удаление.

   Администратору класс не назначается.
*/

.times-bank-user-mode .times-bank-hidden-control {
    display: none !important;
}


/* =========================================================
   МОДАЛЬНОЕ ОКНО НАЧИСЛЕНИЯ
   ========================================================= */

.times-bank-modal {
    --tb-accent: #557f77;

    position: fixed;
    z-index: 2147483000;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0,0,0,.58);
}

.times-bank-modal.is-open {
    display: flex;
}

.times-bank-modal-card {
    width: min(540px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;

    padding: 22px;

    border-radius: 16px;

    background: #fff;
    color: #273632;

    box-shadow:
        0 10px 50px
        rgba(0,0,0,.35);

    line-height: 1.5;
}

.times-bank-modal-card h3 {
    margin: 0 0 10px;
    font-size: 19px;
}

.times-bank-modal-warning {
    margin: 10px 0 16px;
    padding: 10px 12px;

    border:
        1px solid
        rgba(184,128,64,.35);

    border-radius: 12px;

    background:
        rgba(220,178,92,.12);

    font-weight: 700;
}

.times-bank-modal-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.times-bank-modal-steps li {
    padding: 5px 0;
}

.times-bank-modal-steps li::before {
    display: inline-block;
    width: 24px;

    content: "&#9675;";
}

.times-bank-modal-steps li.is-running::before {
    content: "&#9676;";

    animation:
        times-bank-spin
        1s
        linear
        infinite;
}

.times-bank-modal-steps li.is-done::before {
    content: "&#10003;";
}

.times-bank-modal-steps li.is-error::before {
    content: "&#10005;";
}

.times-bank-modal-detail {
    margin-top: 15px;
    padding-top: 12px;

    border-top:
        1px solid
        rgba(75,120,112,.22);

    white-space: pre-wrap;
    word-break: break-word;

    font-size: 12px;
}

#times-bank-modal-close {
    display: none;
    margin-top: 15px;
}

#times-bank-modal-close.is-visible {
    display: inline-block;
}


/* =========================================================
   МОБИЛЬНЫЙ ВИД
   Пока ровно в рамках нынешнего оформления.
   ========================================================= */

@media (max-width: 700px) {

    #times-bank-v60 .tb-overall,
    #times-bank-v60 .tb-result-summary,
    #times-bank-v60 .tb-rates {
        grid-template-columns: 1fr;
    }

    #times-bank-v60 {
        padding: 12px;
        overflow-x: auto;
    }

    .times-bank-modal {
        padding: 10px;
    }

    .times-bank-modal-card {
        max-height:
            calc(100vh - 20px);

        padding: 16px;
    }
}