/* ========================================
   QR MODAL - Generování QR kódu psa
   Komponenta (BEM, MOBILE FIRST)
   ======================================== */

.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.qr-modal__inner {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.qr-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.qr-modal__title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.qr-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
}

.qr-modal__close:hover {
    color: #374151;
}

/* Tisková karta */
.qr-modal__card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    overflow-y: auto;
    flex: 1;
}

.qr-modal__dog-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #8b5cf6;
}

.qr-modal__dog-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    line-height: 1.2;
}

.qr-modal__dog-fullname {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    line-height: 1.3;
    max-width: 280px;
}

.qr-modal__station {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
}

/* Logo webu */
.qr-modal__brand {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qr-modal__brand-logo {
    height: 28px;
    width: auto;
}

/* QR kód s logem uprostřed */
.qr-modal__qr-wrap {
    padding: 14px;
    background: #fff;
    border: 2px solid #8b5cf6;
    border-radius: 12px;
    position: relative;
}

.qr-modal__qr-img {
    display: block;
    width: 200px;
    height: 200px;
}

.qr-modal__qr-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 0 0 3px #fff;
}

.qr-modal__qr-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-modal__scan-text {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    font-weight: 500;
}

.qr-modal__powered {
    font-size: 11px;
    color: #8b5cf6;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.3px;
}

.qr-modal__url {
    font-size: 10px;
    color: #d1d5db;
    text-align: center;
    word-break: break-all;
    max-width: 280px;
}

/* Akce */
.qr-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 16px 24px 20px;
    border-top: 1px solid #e5e7eb;
}

.qr-modal__print-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #8b5cf6;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.qr-modal__print-btn:hover {
    background: #7c3aed;
}

.qr-modal__download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: #374151;
    background: #f3f4f6;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.qr-modal__download-btn:hover {
    background: #e5e7eb;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    /* Odstranit hlavičku a patičku prohlížeče */
    @page {
        margin: 10mm;
        size: auto;
    }

    /* Skrýt vše kromě tiskové karty */
    body > *:not(.qr-modal) {
        display: none !important;
    }

    body {
        margin: 0;
        padding: 0;
    }

    .qr-modal {
        position: static;
        background: none;
        padding: 0;
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }

    .qr-modal__inner {
        box-shadow: none;
        border-radius: 16px;
        border: 2px solid #8b5cf6;
        max-width: none;
        max-height: none;
        width: 80mm;
        margin: 0 auto;
        overflow: visible;
    }

    .qr-modal__header,
    .qr-modal__actions {
        display: none !important;
    }

    .qr-modal__card {
        padding: 8mm 6mm;
        gap: 3mm;
    }

    .qr-modal__dog-photo {
        width: 20mm;
        height: 20mm;
        border-width: 2px;
        border-color: #8b5cf6;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .qr-modal__brand-logo {
        height: 10mm;
    }

    .qr-modal__dog-name {
        font-size: 18pt;
    }

    .qr-modal__dog-fullname {
        font-size: 8pt;
    }

    .qr-modal__station {
        font-size: 10pt;
    }

    .qr-modal__qr-wrap {
        border-color: #8b5cf6;
        border-width: 2px;
        border-radius: 10px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .qr-modal__qr-img {
        width: 38mm;
        height: 38mm;
    }

    .qr-modal__qr-logo {
        width: 10mm;
        height: 10mm;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .qr-modal__scan-text {
        font-size: 9pt;
    }

    .qr-modal__powered {
        font-size: 10pt;
        color: #8b5cf6;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .qr-modal__url {
        font-size: 7pt;
    }
}

/* ----------------------------------------
   QR TLAČÍTKO V TABULCE
   ---------------------------------------- */
.evidence__qr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}

.evidence__qr-btn:hover {
    background: #fff7ed;
    border-color: #f97316;
    color: #f97316;
}

.evidence__qr-btn svg {
    width: 14px;
    height: 14px;
}
