/* ============================================================
   «ТЕХНИКИ ШИНОБИ» — блок в анкете (widget)
   CSS в стиле арсенала (v5). Переменные темы форума:
   --accent, --bord, --main-font, --acc-font, --quo-bg, --quote.
   ============================================================ */
.tch-wrapper,
.tch-modal,
.tch-tip {
    box-sizing: border-box;
    font-family: var(--main-font), Arial, sans-serif;
}
.tch-wrapper *,
.tch-modal *,
.tch-tip * {
    box-sizing: border-box;
}

.tch-wrapper {
    width: 100%;
    margin: 15px 0 !important;
    padding: 20px;
    background: var(--quo-bg) bottom no-repeat, var(--quote);
    border: 1px solid var(--bord);
    border-radius: 12px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.03);
    user-select: none;
    -webkit-user-select: none;
}

.tch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 12px;
    margin-bottom: 20px;
}
.tch-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.tch-title {
    font-family: var(--acc-font);
    font-size: 24px;
    color: var(--accent);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.tch-count {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.5px;
}
.tch-manage {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tch-btn {
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
    color: var(--accent);
    font: 700 10px/1.2 var(--main-font), Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.2s;
}
.tch-btn:hover {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.tch-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tch-privacy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    color: inherit;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.2s;
    margin-left: 4px;
    user-select: none;
}
.tch-privacy:hover {
    opacity: 1;
}
.tch-privacy.sh-saving {
    opacity: 0.4;
    pointer-events: none;
}
.tch-privacy input {
    display: none;
}
.tch-privacy-slider {
    position: relative;
    width: 32px;
    height: 16px;
    background: rgba(150, 150, 150, 0.4);
    border-radius: 10px;
    transition: 0.3s;
}
.tch-privacy-slider::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}
.tch-privacy input:checked + .tch-privacy-slider {
    background: var(--accent);
}
.tch-privacy input:checked + .tch-privacy-slider::before {
    transform: translateX(16px);
    background: #fff;
}

.tch-empty {
    text-align: center;
    padding: 30px 10px;
    opacity: 0.5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tch-wrapper .tch-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    font-family: Verdana, var(--main-font), Arial, sans-serif;
    line-height: 150%;
}
.tch-wrapper .tch-list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tch-link {
    color: var(--accent);
    font-weight: bold;
    text-decoration: none;
}
.tch-link:hover {
    color: var(--text);
    text-decoration: none;
}

body#darkbd .tch-link {
    color: var(--drk-accent, var(--accent));
}
body#darkbd .tch-link:hover {
    color: var(--drk-text, var(--text));
}

/* --- Тултип (карточка техники) --- */
.tch-tip {
    position: fixed;
    z-index: 2147483001;
    max-width: 300px;
    min-width: 200px;
    background: #14141c;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    color: #e9e9f0;
    font-size: 12px;
    line-height: 1.45;
    padding: 10px 12px;
    pointer-events: none;
    text-align: left;
}
.tch-tip-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.tch-tip-img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #0f0f16;
    display: block;
}
.tch-tip-desc {
    color: #c8c8d2;
    max-height: 86px;
    overflow: hidden;
}
.tch-tip-chars {
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 6px;
}
.tch-tip-char {
    color: #9c9cab;
    font-size: 11px;
    line-height: 1.5;
}
.tch-tip-key {
    color: #d8d8e4;
}

/* --- Модалка (заявка / мои заявки) --- */
.tch-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.tch-overlay.open {
    display: flex;
}
.tch-modal {
    background: #fff;
    width: 560px;
    max-width: 95%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    position: relative !important;
    color: #333;
    font-size: 13px;
}
.tch-modal-head {
    background: var(--accent, #59405d);
    color: #fff;
    padding: 15px 20px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}
.tch-modal-close {
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
}
.tch-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: #fdfdfd;
}
.tch-modal-foot {
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}
.tch-field-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    color: #777;
}
.tch-input,
.tch-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    box-sizing: border-box;
    color: #333;
    background: #fff;
}
.tch-textarea {
    height: 110px;
    resize: vertical;
    font-family: monospace;
    line-height: 1.5;
}
.tch-note-input {
    height: 60px;
    resize: vertical;
}
.tch-main-btn {
    background: var(--accent, #59405d);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}
.tch-main-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.tch-ghost-btn {
    background: #eee;
    color: #555;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px;
}
.tch-error {
    display: none;
    background: #fcebea;
    color: #c0392b;
    padding: 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #f5c6cb;
}
.tch-hint {
    font-size: 10px;
    color: #999;
    line-height: 1.5;
    margin-top: 6px;
}

/* Список разобранных ссылок перед отправкой */
.tch-plist {
    margin: 10px 0;
}
.tch-pitem {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 12px;
}
.tch-pitem img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
}
.tch-pitem-name {
    flex: 1;
    font-weight: 700;
    color: #333;
}
.tch-pitem-existing {
    opacity: 0.6;
    background: #f6f6f6;
}
.tch-pitem-existing .tch-pitem-name {
    font-weight: 600;
    color: #888;
}
.tch-pitem-del {
    cursor: pointer;
    color: #c0392b;
    font-weight: 800;
    padding: 4px 8px;
    border: none;
    background: transparent;
    font-size: 14px;
}

/* Список заявок */
.tch-req-list {
    text-align: left;
}
.tch-req {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    color: #333;
}
.tch-req:last-child {
    border-bottom: none;
}
.tch-req-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 4px;
}
.tch-req-date {
    color: #888;
    font-size: 10px;
    margin-bottom: 4px;
    font-weight: 600;
}
.tch-status {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.tch-status.pending {
    background: #fff8e1;
    color: #f9a825;
    border: 1px solid #f9a825;
}
.tch-status.approved {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #2e7d32;
}
.tch-status.rejected {
    background: #fcebea;
    color: #c0392b;
    border: 1px solid #c0392b;
}
.tch-status.removed {
    background: #eceff1;
    color: #546e7a;
    border: 1px solid #90a4ae;
}
.tch-req-note {
    color: #666;
    font-size: 11px;
    line-height: 1.4;
}

/* --- Экран успеха отправки заявки --- */
.tch-status {
    text-align: center;
    padding: 24px 10px 8px;
}
.tch-status-icon-pulsar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tchStatusPulse 1.5s infinite;
}
.tch-status-icon-pulsar.success {
    background: rgba(46, 125, 50, 0.15);
}
.tch-status-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tchStatusPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.tch-status-circle.success {
    background: #2e7d32;
    box-shadow: 0 0 0 1px rgba(46, 125, 50, 0.4);
}
.tch-status-title {
    font-size: 18px;
    font-weight: 800;
    color: #2e7d32;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.tch-status-sub {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}
.tch-status-note {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

@keyframes tchStatusPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

@keyframes tchStatusPop {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 560px) {
    .tch-header {
        flex-direction: column;
        align-items: flex-start;
    }
}