/* Tutorial Modal — kompaktowy, środek ekranu */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: tutFadeIn 0.18s ease-out;
}
.tutorial-overlay.active { display: flex; }

@keyframes tutFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tutSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tutorial-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    width: min(720px, 94vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: tutSlideUp 0.22s ease-out;
}

.tutorial-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #3a5070 0%, #2c3d56 100%);
    color: #fff;
}
.tutorial-modal__header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}
.tutorial-modal__close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.tutorial-modal__close:hover { opacity: 1; }

.tutorial-modal__body {
    padding: 16px 18px 14px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.tutorial-modal__img-wrap {
    background: #f1f3f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
    cursor: zoom-in;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tutorial-modal__img-wrap img {
    width: 100%;
    height: auto;
    max-height: 50vh;
    object-fit: contain;
    display: block;
}
.tutorial-modal__img-wrap .tutorial-placeholder {
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
}

.tutorial-modal__step-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 6px;
}
.tutorial-modal__step-desc {
    font-size: 0.92rem;
    color: #495057;
    line-height: 1.5;
    margin: 0;
}

.tutorial-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 16px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.tutorial-modal__dots {
    display: flex;
    gap: 8px;
}
.tutorial-modal__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ced4da;
    transition: background 0.15s, transform 0.15s;
}
.tutorial-modal__dot.active {
    background: #3a5070;
    transform: scale(1.25);
}

.tutorial-modal__nav {
    display: flex;
    gap: 8px;
}
.tutorial-modal__nav button {
    border: 0;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.tutorial-modal__nav .btn-prev {
    background: #e9ecef;
    color: #495057;
}
.tutorial-modal__nav .btn-prev:hover:not(:disabled) { background: #dee2e6; }
.tutorial-modal__nav .btn-prev:disabled { opacity: 0.4; cursor: not-allowed; }
.tutorial-modal__nav .btn-next,
.tutorial-modal__nav .btn-finish {
    background: #3a5070;
    color: #fff;
}
.tutorial-modal__nav .btn-next:hover,
.tutorial-modal__nav .btn-finish:hover { background: #2c3d56; }

/* Lightbox po kliknięciu w obrazek */
.tutorial-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 30px;
}
.tutorial-lightbox.active { display: flex; }
.tutorial-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    border-radius: 6px;
}

/* Przycisk pomocy "?" */
.tutorial-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid #3a5070;
    color: #3a5070;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.tutorial-help-btn:hover {
    background: #3a5070;
    color: #fff;
}
.tutorial-help-btn--lg {
    padding: 10px 16px;
    font-size: 0.95rem;
    width: 100%;
    justify-content: flex-start;
}
.tutorial-help-btn--lg i { font-size: 1.1rem; margin-right: 4px; }
.tutorial-help-btn i { font-size: 0.9rem; }

@media (max-width: 576px) {
    .tutorial-modal { width: 96vw; }
    .tutorial-modal__header h3 { font-size: 0.95rem; }
    .tutorial-modal__step-title { font-size: 0.98rem; }
}

/* =========================================================================
   Globalna spójność stylu PRZYCISKÓW WYBORU w modalach (Raporty, Samouczki,
   Raporty porównania itp.). Globalne style aplikacji nadpisują border-color
   na transparent — tu przywracamy widoczne ramki dla wszystkich modali.
   ========================================================================= */
.modal .btn.btn-outline-info,
.modal .btn.btn-outline-success,
.modal .btn.btn-outline-primary,
.modal .btn.btn-outline-secondary,
.modal .btn.btn-outline-danger,
.modal .btn.btn-outline-warning {
    border-width: 2px !important;
    border-style: solid !important;
}
.modal .btn.btn-outline-info     { border-color: #0dcaf0 !important; color: #0dcaf0 !important; }
.modal .btn.btn-outline-success  { border-color: #198754 !important; color: #198754 !important; }
.modal .btn.btn-outline-primary  { border-color: #0d6efd !important; color: #0d6efd !important; }
.modal .btn.btn-outline-secondary{ border-color: #6c757d !important; color: #6c757d !important; }
.modal .btn.btn-outline-danger   { border-color: #dc3545 !important; color: #dc3545 !important; }
.modal .btn.btn-outline-warning  { border-color: #ffc107 !important; color: #997404 !important; }

.modal .btn.btn-outline-info:hover     { background:#0dcaf0 !important; color:#fff !important; }
.modal .btn.btn-outline-success:hover  { background:#198754 !important; color:#fff !important; }
.modal .btn.btn-outline-primary:hover  { background:#0d6efd !important; color:#fff !important; }
.modal .btn.btn-outline-secondary:hover{ background:#6c757d !important; color:#fff !important; }
.modal .btn.btn-outline-danger:hover   { background:#dc3545 !important; color:#fff !important; }
.modal .btn.btn-outline-warning:hover  { background:#ffc107 !important; color:#212529 !important; }
