﻿/* #BEGIN ***skladito/shared/styles/components.css*** */
/* 2026-03-15 */
/* =============================================
   components.css — shared component styles v2.18.46
   ============================================= */

/* === НОВЫЕ КАРТОЧКИ === */

.card-new {
    position: relative;
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s;
    overflow: hidden;
    min-height: 70px;
    display: flex;
    flex-direction: row;
}

.card-new:active {
    transform: scale(0.98);
}

.card-new.has-photo {
    min-height: 70px;
}

.card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-photo-right {
    height: 100%;
    width: auto;
    max-width: 40%;
    object-fit: cover;
    flex-shrink: 0;
    margin-left: -12px;
}

.card-new .card-top {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 4px;
    font-size: 15px;
    font-weight: 600;
    z-index: 1;
}

.card-new .card-top .card-picto {
    font-size: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 1.5px solid #333;
}

.card-new .card-top .card-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-new .card-bottom {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 4px 12px 10px;
    font-size: 13px;
    z-index: 1;
}

.card-path {
    font-size: 13px;
    color: #444;
    padding: 4px 0 0;
    line-height: 1.3;
    word-break: break-word;
    width: 100%;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.card-new .card-bottom .card-number {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 14px;
}

.card-new .card-bottom .card-qty {
    font-weight: 700;
    font-size: 15px;
}

.card-new .card-bottom .card-qr-icon {
    font-size: 16px;
    opacity: 0.7;
}


/* Без фото — цветные акценты */
.card-new:not(.has-photo) .card-number {
    color: var(--brand-primary);
}

.card-new:not(.has-photo) .card-qty {
    color: var(--brand-primary);
}

/* Предмет ниже минимума */
.card-new.below-min {
    border-left: 4px solid #dc3545;
}

.card-new.below-min .card-qty {
    color: #dc3545 !important;
}

/* === ОНБОРДИНГ === */

.onboarding,
.onboarding-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--brand-gradient);
    z-index: 2000;
    color: white;
    overflow: hidden;
}

.onboarding.active,
.onboarding-overlay.active {
    display: flex;
    flex-direction: column;
}

.onboarding-slides {
    flex: 1;
    display: flex;
    transition: transform 0.3s ease;
}

.onboarding-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    text-align: center;
    scroll-snap-align: start;
}

.onboarding-icon {
    font-size: 80px;
    margin-bottom: 30px;
}

.onboarding-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.onboarding-text {
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 320px;
}

.onboarding-footer,
.onboarding-nav {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.onboarding-dots {
    display: flex;
    gap: 10px;
}

.onboarding-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.3s;
}

.onboarding-dot.active {
    background: white;
    width: 24px;
    border-radius: 5px;
}

.onboarding-btn {
    background: white;
    color: var(--brand-primary);
    border: none;
    padding: 16px 48px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.onboarding-btn:active {
    transform: scale(0.95);
}

.onboarding-skip {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    cursor: pointer;
    padding: 10px;
}

/* === SCANNER MODE BUTTONS === */
.scanner-mode-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--brand-primary);
    border-radius: 10px;
    background: white;
    color: var(--brand-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.scanner-mode-btn.active {
    background: var(--brand-primary);
    color: white;
}

/* === Container Action Buttons === */
.container-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.container-actions-secondary { display: flex; gap: 8px; margin-bottom: 12px; }

.action-edit-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: var(--brand-primary);
    color: white;
    font-size: 18px;
    cursor: pointer;
}
.action-qr-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #fd7e14;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-share-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #17a2b8;
    color: white;
    font-size: 18px;
    cursor: pointer;
}
.action-access-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #6f42c1;
    color: white;
    font-size: 18px;
    cursor: pointer;
}
.action-move-btn {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: #6f42c1;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-return-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #fd7e14;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.action-force-return-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #fd7e14;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.action-delete-readonly-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #dc3545;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

/* ===== Context Actions (кнопки добавления) ===== */
.context-actions {
    display: flex;
    gap: 10px;
    margin: 24px 0 16px;
    justify-content: center;
    padding: 0 4px;
}

.context-btn {
    padding: 12px 20px;
    border-radius: 24px;
    background: var(--brand-primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: transform 0.15s, background 0.15s;
}

.context-btn:active {
    transform: scale(0.95);
    background: var(--brand-secondary);
}

/* ===== View Toggle Button ===== */
.view-toggle-btn {
    background: none;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
    color: #555;
    transition: transform 0.15s;
    flex: none;
}

.view-toggle-btn:active {
    transform: scale(0.95);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* === Photos Gallery (edit forms) === */
.photos-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.photos-gallery-item { position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; border: 2px solid #ddd; }
.photos-gallery-item.is-main { border-color: var(--brand-primary); }
.photos-gallery-item img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.photos-gallery-star { position: absolute; top: 2px; left: 2px; background: rgba(0,0,0,0.5); border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.photos-gallery-star.active { background: rgba(255,193,7,0.9); }
.photos-gallery-delete { position: absolute; top: 2px; right: 2px; background: rgba(220,53,69,0.8); border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.photos-gallery-add { width: 80px; height: 80px; border: 2px dashed #ccc; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 28px; color: #999; }
.photos-gallery-add:active { background: #f0f0f0; }

/* === Photo Fullscreen Overlay === */
.photo-fullscreen-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 10000; display: flex; align-items: center; justify-content: center; }
.photo-fullscreen-wrap { position: relative; max-width: 95%; max-height: 90%; }
.photo-fullscreen-wrap img { display: block; max-width: 100%; max-height: 90vh; object-fit: contain; }
.photo-fullscreen-close { position: absolute; top: -6px; right: -6px; background: rgba(0,0,0,0.7); border: 2px solid white; color: white; font-size: 20px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.photo-fullscreen-close:active { background: rgba(0,0,0,0.9); }

/* === MODAL CONTENT === */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* === Photo Carousel (container-view) === */
.photo-carousel { position: relative; width: 64px; height: 64px; flex-shrink: 0; border-radius: 10px; overflow: hidden; }
.photo-carousel-track { width: 100%; height: 100%; position: relative; }
.photo-carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; cursor: pointer; }
.photo-carousel-slide.active { opacity: 1; }
.photo-carousel-prev, .photo-carousel-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); color: white; border: none; width: 20px; height: 20px; border-radius: 50%; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; padding: 0; line-height: 1; }
.photo-carousel-prev { left: 1px; }
.photo-carousel-next { right: 1px; }
.photo-carousel-prev:active, .photo-carousel-next:active { background: rgba(0,0,0,0.7); }
.photo-carousel-dots { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; z-index: 2; }
.photo-carousel-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.photo-carousel-dot.active { background: white; }

/* === BURGER HEADER === */
.burger-header { background: var(--brand-gradient); color: white; padding: 20px; position: relative; }
.burger-header h2 { font-size: 20px; margin-bottom: 5px; }
.burger-header p { font-size: 12px; opacity: 0.9; }
.burger-header .sound-toggle-btn { position: absolute; top: 12px; right: 12px; background: none; border: none; font-size: 22px; cursor: pointer; padding: 8px; opacity: 0.8; color: white; }
.burger-header .sound-toggle-btn:active { opacity: 1; transform: scale(0.95); }
.burger-header .sound-toggle-btn.muted { opacity: 0.4; }

/* === LOADER BAR (shared) === */
.loader-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 7px;
    z-index: 99999;
    display: none;
    overflow: hidden;
    background: rgba(0,0,0,0.1);
}
.loader-bar.active {
    display: block;
}
.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: #dc3545;
    animation: loaderSlide 1s ease-in-out infinite;
}
@keyframes loaderSlide {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* === NOTIFICATION BELL === */
.header-notif { position: relative; cursor: pointer; padding: 5px; }
.notif-badge {
    position: absolute; top: -4px; right: -4px;
    background: #dc3545; color: white;
    border-radius: 50%; min-width: 18px; height: 18px;
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}

/* Settings */
.settings-screen { padding: 16px; }
.settings-section { background: white; border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.settings-section-title { font-size: 13px; font-weight: 600; color: #888; text-transform: uppercase; padding: 12px 16px 6px; }
.settings-item { display: flex; align-items: center; padding: 14px 16px; gap: 12px; cursor: pointer; transition: background 0.15s; }
.settings-item:active { background: #f5f5f5; transform: scale(0.98); }
.settings-item-icon { font-size: 20px; width: 28px; text-align: center; }
.settings-item-text { flex: 1; }
.settings-item-title { font-size: 15px; color: #333; }
.settings-item-value { font-size: 13px; color: #888; margin-top: 2px; }

.settings-pm-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #f5f5f5;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.settings-pm-btn:active {
    transform: scale(0.95);
    background: #e0e0e0;
}

/* Feedback threads */
.feedback-thread-card {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.feedback-thread-card:active {
    transform: scale(0.98);
}
.feedback-thread-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.feedback-thread-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    gap: 8px;
    align-items: center;
}
.feedback-thread-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.feedback-thread-status.new { background: #fff3e0; color: #e65100; }
.feedback-thread-status.replied { background: #e8f5e9; color: #2e7d32; }
.feedback-thread-status.resolved { background: #e3f2fd; color: #1565c0; }

.feedback-msg {
    max-width: 85%;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}
.feedback-msg-user {
    background: #f5f5f5;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.feedback-msg-admin {
    background: var(--brand-light, #e8eaf6);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.feedback-msg-date {
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}
.feedback-msg img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 6px;
    cursor: pointer;
}
/* #END ***skladito/shared/styles/components.css*** */
