/* ================================================================
   Elvial Attribute Search v3.1 – Frontend CSS
   Στυλ βασισμένο στην εικόνα: compact 2-column table
   ================================================================ */

/* ── Dropdown: section headline ─────────────────────────────── */
a.dgwt-wcas-suggestion.eas-injected.dgwt-wcas-suggestion-headline {
    pointer-events: none !important;
    cursor: default !important;
    border-top: 1px solid #e8e8e8;
    margin-top: 4px;
    padding-top: 8px;
}
.eas-section-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .1em !important;
    color: #9b9b9b !important;
}

/* ── Dropdown: attribute item ────────────────────────────────── */
a.dgwt-wcas-suggestion.eas-attr-suggestion {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 14px !important;
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer !important;
    transition: background .12s !important;
    border-bottom: 1px solid #f5f5f5 !important;
}
a.dgwt-wcas-suggestion.eas-attr-suggestion:hover,
a.dgwt-wcas-suggestion.eas-attr-suggestion.dgwt-wcas-suggestion-selected {
    background: #f0f4ff !important;
}
.eas-attr-icon { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; }
.eas-attr-item-content { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.eas-attr-item-label { font-size: 13px !important; font-weight: 600 !important; color: #1a1a2e !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
.eas-attr-item-count { font-size: 11px !important; color: #999 !important; }
.eas-attr-arrow { font-size: 13px; color: #bbb; flex-shrink: 0; transition: transform .15s, color .15s; }
a.dgwt-wcas-suggestion.eas-attr-suggestion:hover .eas-attr-arrow,
a.dgwt-wcas-suggestion.eas-attr-suggestion.dgwt-wcas-suggestion-selected .eas-attr-arrow {
    color: #2c5282; transform: translateX(3px);
}
mark.eas-hl { background: #fff3cd; border-radius: 2px; padding: 0 1px; font-weight: 700; color: #333; font-style: normal; }

/* ================================================================
   SHORTCODE TABLE PAGE – compact, like the screenshot
   ================================================================ */

.eas-table-page,
.eas-attr-index { max-width: 760px; margin: 0 auto; font-family: inherit; }

/* Back link */
.eas-back-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; color: #555; text-decoration: none;
    margin-bottom: 14px; padding: 4px 10px;
    border: 1px solid #ddd; border-radius: 4px; background: #fafafa;
    transition: all .15s;
}
.eas-back-link:hover { background: #e8eef8; color: #1a1a2e; border-color: #bbb; }

/* Header */
.eas-table-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; gap: 8px; flex-wrap: wrap;
}
.eas-table-title {
    font-size: 16px !important; font-weight: 700 !important;
    color: #1a1a2e !important; margin: 0 !important;
}
.eas-table-count {
    font-size: 12px; color: #888;
    background: #f0f0f0; border-radius: 10px; padding: 2px 9px;
}

/* ── Compact Table – ακριβώς σαν την εικόνα ── */
.eas-table-wrap {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.eas-results-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 13px;
}

/* Header row – light gray, όχι dark */
.eas-results-table thead tr { background: #f5f5f5; }
.eas-results-table thead th {
    padding: 8px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #555;
    letter-spacing: .03em;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

/* Column widths */

.eas-col-product { width: 70%; }
.eas-col-value   { width: 30%; text-align: right; }

.eas-col-product img {
  width: 52px;
  height: 52px;
  max-width: none;
}

.eas-col-label {
    background: #f5f5f5;
    font-weight: 600;
    text-align: left;
    width: 40%;
}

/* Product name */
.eas-product-name {
    font-size: 12px;
    font-weight: 500;
}

/* Κέντρο τιμών */
.eas-results-table td.eas-value-cell {
    text-align: center;
}


/* Body rows – alternating subtle stripe like the screenshot */
.eas-results-table tbody tr { border-bottom: 1px solid #f0f0f0; transition: background .1s; }
.eas-results-table tbody tr:last-child { border-bottom: none; }
.eas-results-table tbody tr:nth-child(even) { background: #fafafa; }
.eas-results-table tbody tr:hover { background: #eef3ff; }
.eas-results-table td { padding: 7px 14px; vertical-align: middle; }

/* Product cell – inline, μικρή εικόνα + clickable name */
.eas-product-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Μικρή εικόνα – όπως φαίνεται στην εικόνα */
.eas-product-thumb {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain;
    border: 1px solid #ebebeb;
    border-radius: 3px;
    background: #fafafa;
    flex-shrink: 0;
}

/* Clickable product name */
.eas-product-link {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
}
.eas-product-link:hover { color: #2c5282; text-decoration: underline; }

/* Value cell */
.eas-value-cell {
    font-size: 13px;
    color: #333;
    font-weight: 400;
}

/* ── History panel ──────────────────────────────────────────── */
#eas-history-panel {
    margin-bottom: 16px;
}
.eas-history-wrap {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fff;
    padding: 10px 14px;
}
.eas-history-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #999;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.eas-history-clear-all {
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    color: #e53e3e;
    cursor: pointer;
    letter-spacing: 0;
    text-decoration: none;
    border: none;
    background: none;
    padding: 0;
    transition: opacity .15s;
}
.eas-history-clear-all:hover { opacity: .7; }
.eas-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.eas-history-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f0f4ff;
    border: 1px solid #ccd9f0;
    border-radius: 20px;
    padding: 3px 10px 3px 12px;
    font-size: 12px;
}
.eas-history-item a {
    color: #2c5282;
    text-decoration: none;
    font-weight: 500;
}
.eas-history-item a:hover { text-decoration: underline; }
.eas-history-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #ccd9f0;
    color: #555;
    font-size: 10px;
    cursor: pointer;
    border: none;
    padding: 0;
    line-height: 1;
    transition: background .15s;
    flex-shrink: 0;
}
.eas-history-delete:hover { background: #e53e3e; color: #fff; }

/* ── Index grid ─────────────────────────────────────────────── */
.eas-attr-index-intro { font-size: 13px; color: #666; margin-bottom: 12px; }
.eas-attr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.eas-attr-card {
    display: flex; flex-direction: column; gap: 3px;
    padding: 10px 13px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none; color: inherit;
    transition: all .15s;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.eas-attr-card:hover { border-color: #2c5282; box-shadow: 0 2px 8px rgba(44,82,130,.12); transform: translateY(-1px); }
.eas-attr-card-label { font-weight: 600; color: #1a1a2e; font-size: 13px; }
.eas-attr-card-count { font-size: 11px; color: #999; }

/* ── Attribute history badge (μέσα στο FiboSearch recently viewed) ── */
.eas-attr-history-badge {
    font-size: 11px !important;
    color: #2c5282 !important;
    font-weight: 500 !important;
    margin-top: 2px !important;
    display: block !important;
}
.eas-hist-icon { font-size: 14px; }
@media (max-width: 560px) {
    .eas-results-table { font-size: 12px; }
    .eas-results-table td, .eas-results-table th { padding: 6px 10px; }
    .eas-product-thumb { width: 22px; height: 22px; }
    .eas-attr-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}