/* ═══════════════════════════════════════════════════════════
   QUICK MENU — Teljes stílus
   Felelős: lebegő trigger, panel, modalok, billentyűk súgó,
            toast értesítés, screenshot előnézet
   ═══════════════════════════════════════════════════════════ */

/* ── Wrapper ────────────────────────────────────────────────── */
.qm-wrapper {
    position:   fixed;
    bottom:     24px;
    right:      24px;
    z-index:    9000;
    font-family: 'Inter', sans-serif;
}

/* ── Trigger gomb ───────────────────────────────────────────── */
.qm-trigger {
    position:        relative;
    width:           48px;
    height:          48px;
    border-radius:   50%;
    background:      linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow:      0 4px 16px rgba(245, 158, 11, .4);
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    transition:      transform .2s, box-shadow .2s;
    user-select:     none;
}
.qm-trigger:hover {
    transform:  scale(1.1);
    box-shadow: 0 6px 20px rgba(245, 158, 11, .5);
}
.qm-trigger:active { transform: scale(.95); }

.qm-trigger-ikon {
    font-size: 20px;
    color:     #fff;
    transition: transform .3s;
}
.qm-trigger.nyitva .qm-trigger-ikon {
    transform: rotate(20deg);
}

/* Értesítő pont */
.qm-badge {
    position:         absolute;
    top:              -2px;
    right:            -2px;
    width:            16px;
    height:           16px;
    background:       #ef4444;
    color:            #fff;
    border-radius:    50%;
    font-size:        9px;
    font-weight:      700;
    display:          flex;
    align-items:      center;
    justify-content:  center;
    border:           2px solid #fff;
}

/* ── Panel ──────────────────────────────────────────────────── */
.qm-panel {
    position:      absolute;
    bottom:        60px;
    right:         0;
    width:         280px;
    background:    #fff;
    border-radius: 16px;
    border:        1.5px solid #f0d98a;
    box-shadow:    0 8px 32px rgba(0, 0, 0, .12);
    overflow:      hidden;

    /* Animáció */
    opacity:       0;
    transform:     translateY(10px) scale(.97);
    pointer-events: none;
    transition:    opacity .2s, transform .2s;
}
.qm-panel.nyitva {
    opacity:        1;
    transform:      translateY(0) scale(1);
    pointer-events: all;
}

/* Panel fejléc */
.qm-panel-fejlec {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         12px 16px;
    background:      #fff8ee;
    border-bottom:   1.5px solid #f0d98a;
}
.qm-panel-cim {
    font-size:   13px;
    font-weight: 600;
    color:       #92400e;
}
.qm-bez-gomb {
    background:  none;
    border:      none;
    color:       #a16207;
    cursor:      pointer;
    font-size:   14px;
    padding:     2px 4px;
    border-radius: 6px;
    transition:  background .15s;
}
.qm-bez-gomb:hover { background: #fef3c7; }

/* ── Menü elemek ────────────────────────────────────────────── */
.qm-elemek {
    padding: 6px 0;
}

.qm-elem {
    display:         flex;
    align-items:     center;
    gap:             12px;
    width:           100%;
    padding:         10px 16px;
    background:      none;
    border:          none;
    cursor:          pointer;
    transition:      background .15s;
    text-align:      left;
    text-decoration: none;
    color:           inherit;
    font-family:     inherit;
}
.qm-elem:hover { background: #fef9ee; }
.qm-elem:active { background: #fef3c7; }

/* Ikon kör */
.qm-elem-ikon {
    width:           36px;
    height:          36px;
    border-radius:   10px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       16px;
    flex-shrink:     0;
}
.hiba-szin  { background: rgba(239, 68, 68,  .12); color: #dc2626; }
.otlet-szin { background: rgba(245, 158, 11, .12); color: #d97706; }
.ai-szin    { background: rgba(99,  102, 241, .12); color: #6366f1; }
.bill-szin  { background: rgba(20,  184, 166, .12); color: #0d9488; }

/* Elem szöveg */
.qm-elem-szoveg {
    display:        flex;
    flex-direction: column;
    gap:            1px;
    flex:           1;
}
.qm-elem-cim     { font-size: 13px; font-weight: 500; color: #1c1917; }
.qm-elem-leiras  { font-size: 11px; color: #a16207; }

/* Elem nyíl */
.qm-elem-nyil {
    color:     #d4a76a;
    font-size: 12px;
}

/* Panel alap */
.qm-panel-lab {
    padding:     8px 16px;
    background:  #fef9ee;
    border-top:  1px solid #fef3c7;
    font-size:   10px;
    color:       #d4a76a;
    text-align:  center;
}

/* ── Modal háttér ───────────────────────────────────────────── */
.qm-modal-hatter {
    position:        fixed;
    inset:           0;
    background:      rgba(0, 0, 0, .5);
    z-index:         9100;
    display:         none;
    align-items:     center;
    justify-content: center;
    padding:         16px;
    backdrop-filter: blur(4px);
}
.qm-modal-hatter.nyitva {
    display: flex;
}

/* ── Modal doboz ────────────────────────────────────────────── */
.qm-modal {
    background:    #fff;
    border-radius: 16px;
    width:         100%;
    max-width:     480px;
    max-height:    90vh;
    overflow:      hidden;
    display:       flex;
    flex-direction: column;
    box-shadow:    0 20px 60px rgba(0, 0, 0, .2);
    animation:     qmModalBeuszo .2s ease;
}
.qm-modal-nagy { max-width: 640px; }

@keyframes qmModalBeuszo {
    from { opacity: 0; transform: scale(.95) translateY(-10px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Modal fejléc */
.qm-modal-fejlec {
    display:     flex;
    align-items: center;
    justify-content: space-between;
    padding:     16px 20px;
    color:       #fff;
    flex-shrink: 0;
}
.qm-modal-fejlec-bal {
    display:     flex;
    align-items: center;
    gap:         10px;
    font-size:   15px;
    font-weight: 600;
}
.qm-modal-fejlec-bal i { font-size: 18px; }

.hiba-bg  { background: linear-gradient(135deg, #ef4444, #dc2626); }
.otlet-bg { background: linear-gradient(135deg, #f59e0b, #f97316); }
.bill-bg  { background: linear-gradient(135deg, #0d9488, #6366f1); }

.qm-modal-bez {
    background:    none;
    border:        none;
    color:         rgba(255, 255, 255, .8);
    cursor:        pointer;
    font-size:     16px;
    padding:       4px 6px;
    border-radius: 6px;
    transition:    background .15s;
}
.qm-modal-bez:hover { background: rgba(255, 255, 255, .2); }

/* Modal tartalom */
.qm-modal-tartalom {
    padding:    20px;
    overflow-y: auto;
    flex:       1;
    display:    flex;
    flex-direction: column;
    gap:        16px;
}

/* Modal alap */
.qm-modal-lab {
    display:         flex;
    justify-content: flex-end;
    gap:             8px;
    padding:         14px 20px;
    border-top:      1px solid #f0f0f0;
    flex-shrink:     0;
    background:      #fafafa;
}

/* ── Form elemek ────────────────────────────────────────────── */
.qm-form-csoport {
    display:        flex;
    flex-direction: column;
    gap:            6px;
}

.qm-label {
    font-size:   12px;
    font-weight: 600;
    color:       #92400e;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.qm-kotelezo { color: #ef4444; }

.qm-textarea {
    width:         100%;
    background:    #fff;
    border:        1.5px solid #e7c97a;
    border-radius: 10px;
    padding:       10px 14px;
    font-size:     13px;
    color:         #1c1917;
    font-family:   inherit;
    resize:        vertical;
    min-height:    90px;
    transition:    border-color .15s;
    line-height:   1.5;
}
.qm-textarea:focus {
    outline:      none;
    border-color: #f59e0b;
    box-shadow:   0 0 0 3px rgba(245, 158, 11, .1);
}
.qm-textarea::placeholder { color: #d4a76a; }

.qm-textarea-info {
    display:         flex;
    justify-content: flex-end;
}
.qm-chars {
    font-size: 11px;
    color:     #a16207;
}

/* ── Auto info sáv ──────────────────────────────────────────── */
.qm-auto-info {
    display:       flex;
    align-items:   center;
    gap:           8px;
    padding:       10px 14px;
    background:    rgba(245, 158, 11, .08);
    border:        1px solid rgba(245, 158, 11, .2);
    border-radius: 8px;
    font-size:     12px;
    color:         #92400e;
}
.qm-auto-info i { color: #f59e0b; flex-shrink: 0; }

/* ── Info grid (oldal adatok) ───────────────────────────────── */
.qm-info-grid {
    display:        flex;
    flex-direction: column;
    gap:            6px;
    padding:        10px 14px;
    background:     #fef9ee;
    border:         1.5px solid #f0d98a;
    border-radius:  10px;
}
.qm-info-item {
    display:     flex;
    align-items: flex-start;
    gap:         8px;
    font-size:   11px;
}
.qm-info-item i     { color: #d97706; flex-shrink: 0; margin-top: 1px; }
.qm-info-ertek {
    color:       #1c1917;
    word-break:  break-all;
    line-height: 1.4;
}

/* ── Screenshot ─────────────────────────────────────────────── */
.qm-screenshot-doboz {
    border:        1.5px solid #e7c97a;
    border-radius: 10px;
    overflow:      hidden;
    min-height:    80px;
    display:       flex;
    align-items:   center;
    justify-content: center;
    background:    #fef9ee;
}
.qm-screenshot-placeholder {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            6px;
    color:          #d4a76a;
    font-size:      12px;
    padding:        16px;
}
.qm-screenshot-placeholder i { font-size: 24px; }

.qm-screenshot-kep {
    width:      100%;
    max-height: 200px;
    object-fit: contain;
    display:    block;
}

.qm-screenshot-gombok {
    display:    flex;
    gap:        8px;
    margin-top: 6px;
}

/* ── Emoji sor ──────────────────────────────────────────────── */
.qm-emoji-sor {
    display:         flex;
    justify-content: space-between;
    gap:             8px;
}
.qm-emoji-gomb {
    flex:            1;
    font-size:       28px;
    background:      #fef9ee;
    border:          2px solid transparent;
    border-radius:   12px;
    cursor:          pointer;
    padding:         8px 0;
    transition:      all .15s;
    line-height:     1;
}
.qm-emoji-gomb:hover {
    border-color: #f59e0b;
    background:   #fef3c7;
    transform:    scale(1.1);
}
.qm-emoji-gomb.aktiv {
    border-color: #f59e0b;
    background:   #fef3c7;
    transform:    scale(1.1);
}

/* ── Chip gombok (kategória) ────────────────────────────────── */
.qm-chip-sor {
    display:   flex;
    flex-wrap: wrap;
    gap:       6px;
}
.qm-chip {
    padding:       6px 12px;
    border-radius: 20px;
    border:        1.5px solid #e7c97a;
    background:    #fff;
    color:         #92400e;
    font-size:     12px;
    font-weight:   500;
    cursor:        pointer;
    transition:    all .15s;
    font-family:   inherit;
}
.qm-chip:hover  { border-color: #f59e0b; background: #fef9ee; }
.qm-chip.aktiv  {
    background:   linear-gradient(135deg, #f59e0b, #f97316);
    color:        #fff;
    border-color: transparent;
}

/* ── Gombok ─────────────────────────────────────────────────── */
.qm-gomb {
    display:         inline-flex;
    align-items:     center;
    gap:             6px;
    padding:         8px 16px;
    border-radius:   10px;
    font-size:       13px;
    font-weight:     500;
    cursor:          pointer;
    transition:      all .15s;
    font-family:     inherit;
    border:          none;
    white-space:     nowrap;
}
.qm-gomb-elsodleges {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color:      #fff;
}
.qm-gomb-elsodleges:hover   { opacity: .88; }
.qm-gomb-elsodleges:disabled {
    opacity: .5;
    cursor:  not-allowed;
}
.qm-gomb-masodalagos {
    background:   #fff;
    color:        #92400e;
    border:       1.5px solid #e7c97a;
}
.qm-gomb-masodalagos:hover  { background: #fef3c7; }
.qm-gomb-veszelyes {
    background: #fff;
    color:      #dc2626;
    border:     1.5px solid #fca5a5;
}
.qm-gomb-veszelyes:hover    { background: #fef2f2; }

/* ── Billentyűparancsok grid ────────────────────────────────── */
.qm-bill-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap:                   16px;
}
.qm-bill-szekció-cim {
    font-size:     12px;
    font-weight:   600;
    color:         #92400e;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid #f0d98a;
}
.qm-bill-lista {
    display:        flex;
    flex-direction: column;
    gap:            6px;
}
.qm-bill-item {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         6px 0;
    border-bottom:   1px solid #fef3c7;
    gap:             8px;
}
.qm-bill-item:last-child { border-bottom: none; }
.qm-bill-leiras {
    font-size: 12px;
    color:     #1c1917;
    flex:      1;
}
.qm-bill-keys {
    display:     flex;
    align-items: center;
    gap:         3px;
    flex-shrink: 0;
}
kbd {
    display:       inline-flex;
    align-items:   center;
    padding:       2px 6px;
    background:    #f3f4f6;
    border:        1px solid #d1d5db;
    border-radius: 4px;
    font-size:     10px;
    font-family:   'JetBrains Mono', monospace;
    color:         #374151;
    font-weight:   600;
    box-shadow:    0 1px 2px rgba(0,0,0,.1);
}

/* ── Toast értesítés ────────────────────────────────────────── */
.qm-toast {
    position:      fixed;
    bottom:        80px;
    right:         24px;
    background:    linear-gradient(135deg, #22c55e, #16a34a);
    color:         #fff;
    padding:       12px 18px;
    border-radius: 12px;
    font-size:     13px;
    font-weight:   500;
    display:       flex;
    align-items:   center;
    gap:           8px;
    box-shadow:    0 4px 16px rgba(34, 197, 94, .35);
    z-index:       9200;
    animation:     qmToastBeuszo .3s ease;
}
@keyframes qmToastBeuszo {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.qm-toast i { font-size: 16px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    /* Mobilon bal alul */
    .qm-wrapper {
        bottom: 16px;
        right:  16px;
    }

    /* Panel teljes szélesség */
    .qm-panel {
        width:  calc(100vw - 32px);
        right:  0;
        bottom: 58px;
    }

    /* Modal teljes képernyő mobilon */
    .qm-modal-hatter {
        padding:     0;
        align-items: flex-end;
    }
    .qm-modal {
        border-radius: 16px 16px 0 0;
        max-height:    85vh;
        max-width:     100%;
    }
    .qm-modal-nagy {
        max-width: 100%;
    }

    /* Emoji gombok kisebbek */
    .qm-emoji-gomb { font-size: 22px; }

    /* Billentyű grid egy oszlop */
    .qm-bill-grid {
        grid-template-columns: 1fr;
    }

    /* Toast alul középen */
    .qm-toast {
        bottom: 70px;
        right:  16px;
        left:   16px;
    }
}