/* YoMix — custom overrides and additions on top of app.css */

/* ---------- Contrast & readability fixes ---------- */
body {
    color: #212529;
    background-color: #ffffff;
}

/* Донор-футер и CTA-alert были тёмно-синие (#0b163f) — приводим к светлой теме под остальной сайт */
footer {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}
footer b { color: #212529; }
footer a {
    color: #175cff !important;
}
footer a:hover {
    color: #0b5ed7 !important;
}
footer hr {
    border-top: 1px solid #dee2e6;
    opacity: 1;
}

div.alert-message {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6;
    color: #212529 !important;
}
div.alert-message .h5,
div.alert-message h5 {
    color: #212529 !important;
}
div.alert-message p {
    color: #333 !important;
}

/* Donor использует background-image ../images/left.svg + right.svg — этих картинок у нас нет, прячем */
div.left-shape,
div.right-shape {
    display: none !important;
}
section.hero p,
.lead,
.form-help {
    color: #333 !important;
}
.form-help {
    color: #6c757d !important;
    display: block;
    font-size: .85rem;
    margin-top: 4px;
}
label.form-label,
label.form-check-label {
    color: #212529 !important;
}
.navbar-light .navbar-nav .nav-link {
    color: rgba(0, 0, 0, .75) !important;
    font-weight: 500;
}
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: #175cff !important;
}

/* ---------- Brand logo wordmark (text + SVG fallback) ---------- */
.navbar-brand-text {
    color: #212529;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .3px;
    text-decoration: none;
}
.navbar-brand-text span {
    color: #f7a713;
}

/* ---------- Native range sliders (instead of Vue slider) ---------- */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    background: #dee2e6;
    border-radius: 3px;
    height: 4px;
    margin: 16px 0 8px;
    outline: none;
    width: 100%;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, .3);
    cursor: pointer;
    height: 16px;
    width: 16px;
}
.range-slider::-moz-range-thumb {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, .3);
    cursor: pointer;
    height: 16px;
    width: 16px;
}
.range-slider.primary {
    background: linear-gradient(to right, #175cff 0%, #175cff var(--pct, 0%), #dee2e6 var(--pct, 0%), #dee2e6 100%);
}
.range-slider.cyan {
    background: linear-gradient(to right, #22d3ee 0%, #22d3ee var(--pct, 0%), #dee2e6 var(--pct, 0%), #dee2e6 100%);
}
.range-slider.cyan::-webkit-slider-thumb { background: #22d3ee; border-color: #22d3ee; }
.range-slider.cyan::-moz-range-thumb { background: #22d3ee; border-color: #22d3ee; }

/* ---------- Start-mixing: gauge geometry (lifted verbatim from donor inline <style>) ---------- */
.gauge {
    height: 100%;
    position: relative;
    width: 100%;
}
div.gauge {
    height: 74px;
}
div.inner,
div.outside {
    position: absolute;
    top: 0;
}
div.inner {
    left: 0;
}
div.outside {
    cursor: pointer;
    font-size: 22px;
    right: 25px;
    top: -10px;
}
div.arr,
div.arr-center {
    background-color: #ddd;
    left: 0;
    margin-left: auto;
    margin-right: auto;
    position: absolute;
    right: 0;
}
div.arr {
    border-top-left-radius: 100px;
    border-top-right-radius: 100px;
    bottom: 0;
    height: 35px;
    transition: all .5s;
    width: 2px;
}
div.arr-center {
    border-radius: 100%;
    bottom: -5px;
    height: 10px;
    width: 10px;
}

/* ---------- Start-mixing form: address-group (app.css уже стилизует .address-group и span; защищаем только вложенный span) ---------- */
.address-group span span {
    align-items: baseline !important;
    background: transparent !important;
    border: 0 !important;
    display: inline !important;
    margin: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
}
.address-group .btn-remove-addr {
    background: transparent;
    border: none;
    color: #f25767;
    margin-left: 8px;
    padding: 0 6px;
}
.address-group .btn-remove-addr:hover { color: #dc3545; }

/* ---------- Deposit box on order page ---------- */
.deposit-box {
    align-items: center;
    background: #f8f9fa;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    padding: 24px;
    text-align: center;
}
.deposit-box .addr {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    color: #212529;
    display: inline-block;
    font-family: monospace;
    font-size: .95rem;
    margin: 8px 0;
    padding: 10px 14px;
    word-break: break-all;
}
.deposit-box .qr {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    margin-top: 16px;
    padding: 12px;
}
.deposit-box .qr img {
    display: block;
    max-width: 100%;
}
.copy-msg {
    color: #5cc9a7;
    display: none;
    font-size: .85rem;
    font-weight: 600;
    margin-left: 8px;
}
.copy-msg.show {
    display: inline-block;
}

/* ---------- Alerts ---------- */
.alert-error {
    background-color: rgba(242, 87, 103, .15);
    border: 1px solid rgba(242, 87, 103, .3);
    border-radius: .5rem;
    color: #c0354a;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
}
.alert-notice {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: .5rem;
    color: #664d03;
    font-size: .9rem;
    padding: .75rem 1rem;
}

/* ---------- Order page specific ---------- */
.status-box {
    background: #f8f9fa;
    border-radius: .75rem;
    margin-top: 20px;
    padding: 16px 20px;
}
.status-box .spin {
    border: 3px solid #dee2e6;
    border-top-color: #175cff;
    border-radius: 50%;
    display: inline-block;
    height: 18px;
    margin-right: 10px;
    vertical-align: middle;
    width: 18px;
    animation: rotation 1s linear infinite;
}
.status-done { color: #198754; font-weight: 700; }
.status-error { color: #dc3545; font-weight: 700; }
.info-list {
    list-style: none;
    padding-left: 0;
}
.info-list li {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}
.info-list li:last-child { border-bottom: none; }

/* ---------- Blog listing ---------- */
.blog-page {
    padding: 8rem 0 6rem;
}
.blog-page h1 {
    margin-bottom: 2.5rem;
    text-align: center;
}
.blog-empty {
    padding: 4rem 0;
    text-align: center;
}
.blog-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.blog-card {
    background: #fff;
    border: 1px solid #f1f1f1;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}
.blog-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    transform: translateY(-4px);
}
.blog-card .thumb {
    aspect-ratio: 16 / 9;
    display: block;
    overflow: hidden;
}
.blog-card .thumb img {
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
    width: 100%;
}
.blog-card:hover .thumb img {
    transform: scale(1.05);
}
.blog-card .body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px 22px 24px;
}
.blog-card .meta {
    color: #6c757d;
    font-size: .8rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.blog-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
}
.blog-card h2 a {
    color: #212529;
    text-decoration: none;
}
.blog-card h2 a:hover {
    color: #175cff;
}
.blog-card .excerpt {
    color: #575757;
    font-size: .92rem;
    line-height: 1.55;
    margin: 0;
}

/* ---------- Blog single post ---------- */
.post-article {
    padding: 7rem 0 5rem;
}
.post-article .crumbs {
    color: #6c757d;
    font-size: .85rem;
    margin-bottom: 16px;
    text-transform: uppercase;
}
.post-article .crumbs a {
    color: #175cff;
    text-decoration: none;
}
.post-article h1 {
    color: #212529;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 24px;
}
.post-article .featured {
    border-radius: 1rem;
    margin: 24px 0 30px;
    overflow: hidden;
}
.post-article .featured img {
    display: block;
    height: auto;
    width: 100%;
}
.post-body {
    color: #212529;
    font-size: 1.02rem;
    line-height: 1.75;
}
.post-body h2 {
    color: #212529;
    font-size: 1.65rem;
    font-weight: 700;
    margin: 36px 0 14px;
}
.post-body h3 {
    color: #212529;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 28px 0 12px;
}
.post-body p {
    color: #212529;
    margin-bottom: 18px;
}
.post-body ul,
.post-body ol {
    color: #212529;
    margin-bottom: 18px;
    padding-left: 1.5rem;
}
.post-body li {
    margin-bottom: 6px;
}
.post-body a {
    color: #175cff;
}
.post-body img {
    border-radius: .75rem;
    display: block;
    height: auto;
    margin: 20px auto;
    max-width: 100%;
}
.post-body blockquote {
    background: #f8f9fa;
    border-left: 4px solid #175cff;
    border-radius: .25rem;
    color: #333;
    margin: 20px 0;
    padding: 14px 20px;
}
.post-body pre, .post-body code {
    background: #f1f3f5;
    border-radius: .25rem;
    color: #212529;
    font-size: .92em;
    padding: 2px 6px;
}
.post-body pre {
    overflow-x: auto;
    padding: 14px 16px;
}
.expert-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 1rem;
    margin: 30px 0;
    padding: 22px;
}
.expert-block .head {
    align-items: center;
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}
.expert-block .head img {
    border-radius: 50%;
    height: 56px;
    object-fit: cover;
    width: 56px;
}
.expert-block .name {
    color: #212529;
    font-weight: 700;
}
.expert-block .pos {
    color: #6c757d;
    font-size: .85rem;
}
.faq-section {
    margin: 40px 0;
}
.faq-section h2 {
    margin-bottom: 1.2rem;
}
.post-related {
    margin-top: 3rem;
}
.post-back {
    margin-top: 2rem;
    text-align: center;
}

/* ---------- Pagination ---------- */
.pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 3rem;
}
.pagination a,
.pagination .current,
.pagination .ellipsis {
    border-radius: .375rem;
    color: #575757;
    display: inline-block;
    font-size: .9rem;
    font-weight: 500;
    padding: .5rem .9rem;
    text-decoration: none;
}
.pagination a {
    background: #fff;
    border: 1px solid #dee2e6;
}
.pagination a:hover {
    background: #f8f9fa;
    color: #175cff;
}
.pagination .current {
    background: #175cff;
    border: 1px solid #175cff;
    color: #fff;
}
.pagination .ellipsis {
    border: none;
}

/* ---------- Rotation animation fallback ---------- */
@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 768px) {
    section.hero {
        padding-top: 6rem;
        padding-bottom: 4rem;
    }
    section.small-section,
    section.default-section,
    section.second {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .blog-page {
        padding: 6rem 0 4rem;
    }
    .post-article {
        padding: 6rem 0 3rem;
    }
    .post-article h1 {
        font-size: 1.8rem;
    }
}

/* ---------- Latest articles preview on home ---------- */
.latest-articles-section {
    padding: 6rem 0;
}
.latest-articles-section .header {
    margin-bottom: 2rem;
    text-align: center;
}

/* ---------- Keep disabled primary buttons readable ---------- */
.btn-primary:disabled,
.btn-primary.disabled {
    background-color: #7a97e8;
    border-color: #7a97e8;
    color: #fff;
    opacity: 1;
}

/* ---------- Order page deposit address formatting ---------- */
.order-meta {
    margin-top: 16px;
}
.order-meta .row-item {
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}
.order-meta .row-item:last-child {
    border-bottom: none;
}
.order-meta .label {
    color: #6c757d;
    font-size: .9rem;
}
.order-meta .val {
    color: #212529;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}
