/* SoftMit — Global Smart Search styling
   Self-contained — δεν επηρεάζει υπόλοιπο styling */

/* ────── TOPBAR TRIGGER BUTTON ────── */
.softmit-search-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s;
    min-width: 240px;
    height: 36px;
}
.softmit-search-trigger:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}
.softmit-search-trigger .sm-trig-icon {
    width: 16px;
    height: 16px;
    color: #64748b;
    flex-shrink: 0;
}
.softmit-search-trigger .sm-trig-text {
    flex: 1;
    text-align: left;
    color: #64748b;
}
.softmit-search-trigger .sm-trig-kbd {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 11px;
    background: #f1f5f9;
    color: #475569;
    padding: 3px 7px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Σε στενό topbar/mobile, μόνο εικονίδιο */
@media (max-width: 768px) {
    .softmit-search-trigger {
        min-width: auto;
        padding: 8px;
    }
    .softmit-search-trigger .sm-trig-text,
    .softmit-search-trigger .sm-trig-kbd {
        display: none;
    }
}

/* ────── FLOATING ACTION BUTTON ────── */
.softmit-search-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9990;
    transition: all 0.2s;
}
.softmit-search-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 25px rgba(29, 78, 216, 0.55);
}
.softmit-search-fab:active {
    transform: scale(0.96);
}
.softmit-search-fab svg {
    width: 22px;
    height: 22px;
}

/* Σε desktop με topbar trigger, κρύβουμε το FAB */
@media (min-width: 769px) {
    .softmit-search-fab {
        display: none;
    }
}

/* ────── FIRST-TIME TOOLTIP ────── */
.softmit-search-tooltip {
    z-index: 10001;
    max-width: 320px;
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.softmit-search-tooltip.sm-tt-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.softmit-search-tooltip .sm-tt-arrow {
    position: absolute;
    top: -8px;
    right: 60px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    border-top: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
}
.softmit-search-tooltip .sm-tt-content {
    background: white;
    color: #1e293b;
    padding: 18px 20px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    position: relative;
}
.softmit-search-tooltip .sm-tt-title {
    font-size: 15px;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 8px;
}
.softmit-search-tooltip .sm-tt-text {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 12px;
}
.softmit-search-tooltip .sm-tt-text kbd {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 11px;
    background: #f1f5f9;
    color: #1e293b;
    padding: 3px 7px;
    border-radius: 5px;
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 -1px 0 #cbd5e1;
}
.softmit-search-tooltip .sm-tt-dismiss {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.softmit-search-tooltip .sm-tt-dismiss:hover {
    background: #2563eb;
}

/* ────── MODAL ────── */
#softmit-search-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: none;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
#softmit-search-modal.sm-open {
    display: block;
    animation: sm-fade-in 0.18s ease;
}
@keyframes sm-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
body.sm-no-scroll {
    overflow: hidden;
}

#softmit-search-modal .sm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

#softmit-search-modal .sm-panel {
    position: relative;
    margin: 8vh auto 0;
    max-width: 680px;
    width: calc(100% - 32px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    animation: sm-pop-in 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes sm-pop-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
#softmit-search-modal .sm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
#softmit-search-modal .sm-search-icon {
    width: 22px;
    height: 22px;
    color: #94a3b8;
    flex-shrink: 0;
}
#softmit-search-modal .sm-search-icon svg {
    width: 100%;
    height: 100%;
}
#softmit-search-modal .sm-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 17px;
    background: transparent;
    color: #0f172a;
    font-family: inherit;
}
#softmit-search-modal .sm-input::placeholder {
    color: #94a3b8;
}
#softmit-search-modal .sm-close-btn {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
#softmit-search-modal .sm-close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}
#softmit-search-modal .sm-close-btn svg {
    width: 16px;
    height: 16px;
}

/* Body */
#softmit-search-modal .sm-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

/* Hint */
#softmit-search-modal .sm-hint {
    padding: 24px 20px;
    color: #64748b;
}
#softmit-search-modal .sm-hint-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #1e293b;
    font-size: 14px;
}
#softmit-search-modal .sm-hint ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.9;
}
#softmit-search-modal .sm-hint em {
    background: #fef3c7;
    color: #78350f;
    padding: 1px 6px;
    border-radius: 4px;
    font-style: normal;
    font-family: ui-monospace, monospace;
    font-size: 12px;
}

/* Status (loading/empty) */
#softmit-search-modal .sm-status {
    padding: 30px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}
#softmit-search-modal .sm-status.sm-error {
    color: #b91c1c;
}

/* Results */
#softmit-search-modal .sm-results {
    padding: 0 12px 12px;
}
#softmit-search-modal .sm-group {
    margin-top: 12px;
}
#softmit-search-modal .sm-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--gcolor, #475569);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#softmit-search-modal .sm-group-icon {
    font-size: 14px;
}
#softmit-search-modal .sm-group-label {
    flex: 1;
}
#softmit-search-modal .sm-group-count {
    background: color-mix(in srgb, var(--gcolor, #475569) 12%, transparent);
    color: var(--gcolor, #475569);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
}
#softmit-search-modal .sm-group-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
#softmit-search-modal .sm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}
#softmit-search-modal .sm-item.sm-selected {
    background: #eff6ff;
}
#softmit-search-modal .sm-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--gcolor, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
#softmit-search-modal .sm-item-text {
    flex: 1;
    min-width: 0;
}
#softmit-search-modal .sm-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#softmit-search-modal .sm-item-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#softmit-search-modal .sm-item-arrow {
    font-size: 16px;
    color: #cbd5e1;
    opacity: 0;
    transition: opacity 0.15s;
}
#softmit-search-modal .sm-item.sm-selected .sm-item-arrow {
    opacity: 1;
    color: #3b82f6;
}
#softmit-search-modal .sm-mark {
    background: #fef08a;
    color: inherit;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 700;
}
#softmit-search-modal .sm-total {
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
    padding: 12px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer */
#softmit-search-modal .sm-footer {
    padding: 10px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
#softmit-search-modal .sm-key {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    background: white;
    border: 1px solid #cbd5e1;
    padding: 2px 6px;
    border-radius: 4px;
    color: #475569;
    font-size: 10px;
    box-shadow: 0 1px 0 #cbd5e1;
    margin-right: 4px;
}

/* Mobile tweaks */
@media (max-width: 640px) {
    #softmit-search-modal .sm-panel {
        margin: 4vh auto 0;
        max-height: 92vh;
        border-radius: 14px;
    }
    #softmit-search-modal .sm-input {
        font-size: 16px; /* prevents iOS zoom */
    }
}
