/*!
 * Project: PC Builder (CITEd.gr VLE)
 * Author: Γεωργαλάς Αθανάσιος-Αντώνιος (Θάνος) — info@cited.gr
 * Copyright: © 2019–2025 CITEd.gr
 * License: MIT
 * Description: Στυλ UI/UX για πίνακα επιλογών, modals, compact actions, footer/social, και έντονα info κουμπιά με λειτουργικό pulse.
 */
:root {
  --bg:#f6f8fb;
  --card:#ffffff;
  --accent:#0f4c81;
  --accent2:#1b6ca8;
  --muted:#5f6b7a;
  --border:#e5e7eb;
  --success:#2e7d32;
  --danger:#c62828;
  --warn:#fb8c00;
}
*{box-sizing:border-box} html,body{height:100%}
body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:linear-gradient(180deg,var(--bg),#eaf0f7);color:#111827}

/* Topbar */
.topbar{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:var(--accent);color:#fff;position:sticky;top:0;z-index:50}
.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;min-width:0}
.brand-logo{height:30px;width:auto}
.brand-name{font-weight:700;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-right{display:flex;align-items:center;gap:10px}
.social{display:flex;gap:6px;margin-left:6px}
.social-link{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:rgba(255,255,255,0.12);color:#fff;text-decoration:none}
.social-link:hover{background:rgba(255,255,255,0.24)}
.social-link svg{display:block;width:20px;height:20px}

/* Layout */
.container{display:flex;gap:16px;padding:12px;max-width:1200px;margin:0 auto}
.left{width:520px}
.right{flex:1;position:sticky;top:64px;height:calc(100vh - 96px);overflow:auto}

/* Panels */
.panel{background:var(--card);padding:12px;border-radius:14px;box-shadow:0 8px 26px rgba(15,76,129,0.12);border:1px solid var(--border)}
.component-row{margin-bottom:12px}
.label{display:block;font-weight:700;margin-bottom:6px}

/* Usage block */
.usage-block{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.usage-label-strong{font-weight:700;color:#0f172a}
.usage-block select{padding:10px;border-radius:10px;border:1px solid var(--border);background:#fff;color:#0f172a}

/* Tabs */
.tabs{display:flex;gap:8px;margin:8px 0 12px;flex-wrap:wrap}
.tab{background:#f1f5f9;border:1px solid var(--border);padding:6px 10px;border-radius:999px;cursor:pointer;font-weight:600}
.tab.active{background:var(--accent2);color:#fff;border-color:var(--accent2)}
.tab-content{display:none}
.tab-content.active{display:block}

/* Filters */
.filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
.filter-row label{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}
.filter-row input,.filter-row select{width:100%;padding:10px;border:1px solid var(--border);border-radius:10px;background:#fff}

/* Chooser */
.chooser{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;background:#fff;padding:10px;border-radius:12px;border:1px solid var(--border)}
.thumb{width:72px;height:54px;background:#f8fafc;border-radius:10px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.thumb img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.seltext{color:#1f2937;line-height:1.5}
.chooser-actions{display:flex;gap:6px;align-items:center}
.chooser-actions.compact .btn{padding:6px 10px;font-size:12px}
.chooser-actions.compact .btn.small{padding:5px 8px}
.chooser-actions .btn{white-space:nowrap}

/* Row actions */
.row-actions{margin-top:10px}

/* Buttons */
.btn{background:#eef2f6;border:1px solid var(--border);padding:10px 14px;border-radius:10px;cursor:pointer;font-weight:700;color:#0f172a}
.btn:hover{background:#e3e9f2}
.btn.primary{background:var(--accent2);color:#fff;border-color:var(--accent2)}
.btn.ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,0.5)}
.btn.small{padding:6px 10px;font-size:12px}

/* Info button — έντονο + εικονίδιο */
.btn.info{
  background:#0f4c81;
  color:#fff;
  border-color:#0f4c81;
  box-shadow:0 2px 6px rgba(15,76,129,0.35);
}
.btn.info:hover{
  background:#155b9c;
  border-color:#155b9c;
  box-shadow:0 3px 8px rgba(15,76,129,0.45);
}
.btn.info.small{padding:6px 10px;font-weight:800;letter-spacing:0.2px}
.btn.info::before{
  content:"ⓘ";
  display:inline-block;
  margin-right:6px;
  font-weight:900;
  opacity:0.95;
}

/* Pulse animation — λειτουργικό */
@keyframes pulseGlow{
  0%{box-shadow:0 0 0 0 rgba(15,76,129,0.0)}
  50%{box-shadow:0 0 0 8px rgba(15,76,129,0.18)}
  100%{box-shadow:0 0 0 0 rgba(15,76,129,0.0)}
}
.pulse{
  animation:pulseGlow 2.6s ease-in-out infinite;
}
.pulse:hover{animation:none} /* κόβει το pulse στο hover */

/* Badges */
.badges{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid var(--border);background:#fff;font-size:12px}
.badge.ok{border-color:#c8e6c9;background:#e8f5e9}
.badge.warn{border-color:#ffe0b2;background:#fff3e0}
.badge.err{border-color:#ffcdd2;background:#ffebee}

/* Specs and panels */
.specs{font-size:14px}
.panel hr{border:0;border-top:1px solid var(--border);margin:8px 0}

/* Sticky actions for mobile */
.sticky-actions{position:sticky;bottom:0;background:linear-gradient(180deg, rgba(255,255,255,0), #fff 20%);padding:8px;border-top:1px solid var(--border);display:flex;gap:8px;flex-wrap:wrap}

/* Modal */
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;padding:20px;z-index:60}
.modal[aria-hidden="false"]{display:flex}
.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,0.45)}
.modal-dialog{position:relative;width:960px;max-width:calc(100% - 40px);background:#fff;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;border:1px solid var(--border);box-shadow:0 20px 50px rgba(0,0,0,0.25)}
.modal-header{display:flex;gap:10px;align-items:center;padding:12px;border-bottom:1px solid var(--border);background:linear-gradient(90deg,#f7fbff,#fff)}
.modal-footer{padding:12px;border-top:1px solid var(--border);text-align:right}
.modal-content{padding:12px}
.modal-content.scrollable{max-height:64vh;overflow:auto}
.help-section{margin-bottom:12px}
.help-section h4{margin:0 0 6px}
.help-section p, .help-section li{line-height:1.6}
#modalSearch{flex:1;padding:10px;border-radius:10px;border:1px solid var(--border)}
.modal-list{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:12px;max-height:60vh;overflow:auto}
.card-item{display:flex;gap:10px;align-items:center;padding:10px;border:1px solid var(--border);border-radius:12px;cursor:pointer;background:#fff;transition:transform .06s ease, box-shadow .06s ease}
.card-item:hover{transform:translateY(-1px);box-shadow:0 10px 18px rgba(0,0,0,0.08);background:linear-gradient(90deg,#f8fbff,#fff)}
.card-thumb{width:96px;height:68px;flex-shrink:0;background:#fafafa;display:flex;align-items:center;justify-content:center;border-radius:10px;overflow:hidden}
.card-info{font-size:13px}
.card-info b{display:block;margin-bottom:4px}
.icon-btn{background:#eef2f6;border:1px solid var(--border);padding:8px 10px;border-radius:10px;cursor:pointer}
.icon-btn:hover{background:#e3e9f2}

/* Info links */
.info-links{padding:12px}
.link-list{list-style:none;padding:0;margin:8px 0;display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:8px}
.link-list li{background:#f8fafc;border:1px solid var(--border);border-radius:10px;padding:10px}
.link-list a{color:#0f4c81;text-decoration:none;font-weight:600}
.link-list a:hover{text-decoration:underline}
.link-list .muted{font-size:12px;color:#6b7280}

/* Footer */
.footer-clean{
  margin-top:24px;
  padding:16px 18px 22px;
  background:#fff;
  border-top:1px solid var(--border);
}
.footer-line{
  height:4px;
  width:80px;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  border-radius:4px;
  margin:0 auto 14px auto;
}
.footer-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  max-width:1200px;
  margin:0 auto;
  color:#374151;
}
.footer-col{display:flex;flex-direction:column;gap:8px}
.footer-branding .footer-name{font-weight:700;letter-spacing:.2px}
.footer-branding .footer-copy{color:#4b5563}
.footer-actions{align-items:flex-end}
.footer-icons{display:flex;gap:10px;flex-wrap:wrap}
.footer-icons .icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid var(--border);
  color:#0f172a;
  background:#f8fafc;
  text-decoration:none;
  transition:background .15s ease, transform .08s ease;
}
.footer-icons .icon:hover{
  background:#eef2f6;
  transform:translateY(-1px);
}
.footer-icons .icon svg{width:20px;height:20px;display:block}
.footer-links{display:flex;align-items:center;gap:8px;color:#4b5563;flex-wrap:wrap}
.footer-links a{color:#0f4c81;text-decoration:none}
.footer-links a:hover{text-decoration:underline}
.sep{opacity:.5}

/* Responsive tweaks */
@media (max-width:980px){
  .modal-list{grid-template-columns:repeat(2,1fr)}
  .left{width:100%}
  .right{position:static;height:auto}
}
@media (max-width:760px){
  .brand-logo{height:26px}
  .brand-name{font-size:15px}
  .tabs{gap:6px}
  .tab{padding:6px 10px}
  .filters{grid-template-columns:1fr;gap:10px}
}
@media (max-width:640px){
  .container{flex-direction:column}
  .modal-list{grid-template-columns:1fr}
}
