
/* Floating widget */
.cccf-floating{
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: auto;
  width: 340px;
  max-width: calc(100vw - 32px);
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  border-radius: 12px;
  z-index: 999999;
  overflow: hidden;
  font-size: 14px;
}
.cccf-floating.cccf-hidden{ display:none; }
.cccf-floating__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: #f6f7f8;
  cursor: move;
  user-select: none;
}
.cccf-floating__title{ font-weight:700; display:flex; gap:8px; align-items:center; }
.cccf-floating__count{ min-width:22px; padding:2px 8px; border-radius:999px; background:rgba(0,0,0,.08); text-align:center; font-weight:700; }
.cccf-floating__toggle{ border:0; background:transparent; font-size:18px; line-height:1; padding:4px 8px; cursor:pointer; }
.cccf-floating__body{ padding:10px 12px; }
.cccf-floating.cccf-collapsed .cccf-floating__body{ display:none; }

.cccf-floating__list{ max-height:220px; overflow:auto; display:flex; flex-direction:column; gap:10px; }
.cccf-item{ display:flex; gap:10px; align-items:center; border:1px solid rgba(0,0,0,.08); border-radius:10px; padding:8px; }
.cccf-item__thumb img{ width:44px; height:44px; object-fit:cover; border-radius:8px; display:block; }
.cccf-thumb--ph{ width:44px; height:44px; border-radius:8px; background:rgba(0,0,0,.06); }
.cccf-item__meta{ flex:1; min-width:0; }
.cccf-item__name{ display:block; font-weight:600; text-decoration:none; color:#111; }
.cccf-item__price{ opacity:.85; font-size:13px; margin-top:2px; }
.cccf-remove{ border:0; background:rgba(220,38,38,.14); color:#b91c1c; border-radius:999px; cursor:pointer; }
.cccf-remove--tiny{ width:26px; height:26px; font-size:18px; line-height:1; display:flex; align-items:center; justify-content:center; }

.cccf-floating__actions{ display:flex; justify-content:center; margin-top:10px; }
.cccf-btn{ width:100%; border-radius:10px !important; }
.cccf-btn--primary{ font-weight:700; }

.cccf-empty{ padding:14px; border:1px dashed rgba(0,0,0,.18); border-radius:10px; text-align:center; opacity:.85; }

.cccf-notice{
  position: fixed; left:50%; bottom:18px; transform:translateX(-50%);
  background: rgba(17,17,17,.92); color:#fff;
  padding:10px 14px; border-radius:999px; font-size:12px;
  opacity:0; pointer-events:none; transition: opacity .18s ease; z-index:1000000;
}
.cccf-notice--show{ opacity:1; }

/* Text-only compare buttons */
.cccf-loop-btn, .cccf-single-btn{ text-align:center; margin-top:6px; margin-bottom:10px; }
.cccf-compare-btn{
  background: transparent !important; border:0 !important; padding:0 !important; box-shadow:none !important;
  text-decoration: underline; color:#111 !important;
  font-weight: 400 !important; font-size: 13px !important;
  cursor:pointer;
}
.cccf-compare-btn.cccf-in-list{ text-decoration:none; opacity:.85; }

/* Compare page */
.cccf-compare-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin:8px 0 16px; flex-wrap:wrap; }
.cccf-compare-toolbar__right{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.cccf-filter{ display:flex; align-items:center; gap:8px; }
.cccf-table-scroll{ overflow:auto; border:1px solid rgba(0,0,0,.10); border-radius:12px; }
.cccf-compare-table{ border-collapse:collapse; width:100%; min-width:720px; }
.cccf-compare-table th, .cccf-compare-table td{ border-bottom:1px solid rgba(0,0,0,.08); border-right:1px solid rgba(0,0,0,.06); padding:12px; vertical-align:top; }
.cccf-compare-table thead th{ position: sticky; top:0; background:#fff; z-index:2; }
.cccf-th-label{ position: sticky; left:0; background:#fff; z-index:3; min-width:180px; }
.cccf-th-product{ min-width:260px; text-align:center; }
.cccf-diff{ background: rgba(0,0,0,.06); }

.cccf-prod-head{ position: relative; display:flex; flex-direction:column; align-items:center; }
.cccf-prod-head__img img{ width: 160px; height: 160px; object-fit:cover; border-radius: 14px; display:block; margin: 0 auto 12px auto; }
.cccf-prod-head__name{ font-weight:400; color:#111; text-decoration:none; }
.cccf-remove--corner{
  position:absolute; top:10px; right:10px; width:26px; height:26px; padding:0 !important;
  display:flex; align-items:center; justify-content:center;
  font-size:18px !important;
}
.cccf-prod-head__actions{ width:100%; margin-top:10px; display:flex; justify-content:center; }
.cccf-addcart{ font-weight:400 !important; font-size:12px !important; padding:8px 10px !important; border-radius:10px !important; }

.cccf-compare-btn.cccf-loading{
  pointer-events:none;
  position:relative;
  color:transparent !important;
}
.cccf-compare-btn.cccf-loading::after{
  content:'';
  width:14px;
  height:14px;
  border:2px solid rgba(0,0,0,.3);
  border-top-color:#111;
  border-radius:50%;
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  animation: cccf-spin 0.8s linear infinite;
}
@keyframes cccf-spin{to{transform:translate(-50%,-50%) rotate(360deg);}}

/* Spinner on compare buttons */
.cccf-compare-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  min-width: 16px;
}
.cccf-compare-btn.cccf-loading{
  pointer-events:none;
}
.cccf-compare-btn.cccf-loading span{
  opacity: 0;
}

/* If theme forces color/background, make spinner still visible */
.cccf-compare-btn.cccf-loading{
  color: transparent !important;
}

/* Compare page bottom actions (small/subtle) */
.cccf-compare-actions{
  margin-top: 12px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.cccf-action-link{
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 12px;
  color: rgba(0,0,0,.65);
  text-decoration: underline;
  cursor: pointer;
}
.cccf-action-link:hover{ color: rgba(0,0,0,.85); }

.cccf-share-panel{
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 12px;
  background: rgba(0,0,0,.03);
}
.cccf-share-panel__title{
  font-size: 12px;
  opacity: .8;
  margin-bottom: 6px;
}
.cccf-share-panel__input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  font-size: 12px;
}
.cccf-share-panel__actions{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.cccf-share-pill{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  font-size: 12px;
  color: rgba(0,0,0,.75);
  text-decoration:none;
}
.cccf-share-pill:hover{ color: rgba(0,0,0,.95); }

/* Print: keep actions visible? up to you; hide panel and actions when printing */
@media print{
  .cccf-compare-actions{ display:none !important; }
}

/* Widget actions: include clear link */
.cccf-floating__actions{
  gap: 12px;
  align-items: center;
}
.cccf-floating__actions .cccf-action-link{
  font-size: 12px;
  color: rgba(0,0,0,.65);
  text-decoration: underline;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.cccf-floating__actions .cccf-action-link:hover{ color: rgba(0,0,0,.85); }

/* Spinner on corner remove while removing */
.cccf-remove--corner.cccf-loading{
  color: transparent !important;
}
.cccf-remove--corner.cccf-loading::after{
  content:'';
  width:14px;
  height:14px;
  border:2px solid rgba(185,28,28,.35);
  border-top-color:#b91c1c;
  border-radius:50%;
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  animation: cccf-spin 0.8s linear infinite;
}
