/* ==========================================================================
   SCOPE OF WORK & ACTIVITY WEIGHTAGE STYLES
   ========================================================================== */

.scope-content {
  padding: 10px 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 12px;
  line-height: 1.35;
}

.scope-block {
  background: #fafbfc;
  border: 1px solid #e5e8ec;
  border-radius: 4px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.scope-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
  gap: 6px;
}

.scope-title {
  font-weight: bold;
  text-decoration: underline;
  color: var(--primary-blue);
  font-size: 11.5px;
}

.scope-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #dde2e8;
  flex-wrap: wrap;
}

.weight-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.weight-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #eef6fb;
  border: 1px solid #b6d4fe;
  color: var(--primary-blue);
  font-size: 10px;
  font-weight: bold;
  padding: 1px 6px;
  border-radius: 3px;
}

.subweight-warn {
  display: none;
  font-size: 9px;
  font-weight: bold;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  border-radius: 3px;
  padding: 1px 4px;
  cursor: pointer;
  user-select: none;
}

.subweight-warn.visible {
  display: inline-block;
}

.phase-tag {
  font-size: 9.5px;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.tag-done { background: #d4edda; color: #155724; }
.tag-delay { background: #fff3cd; color: #856404; }
.tag-active { background: #cfe2f3; color: #0b4a82; }
.tag-upcoming { background: #e2e3e5; color: #383d41; }

/* Activity List with Customisable Weightages */
.activity-list {
  list-style: none;
  padding-left: 0;
  font-size: 10.8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
  padding: 2px 3px;
  border-radius: 3px;
  transition: background-color 0.12s ease;
}

.activity-item:hover {
  background: #f1f5f9;
}

.act-left {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.act-check {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid #94a3b8;
  background: #fff;
  color: transparent;
  font-size: 9.5px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  user-select: none;
  transition: all 0.12s ease;
}

.activity-item.act-done .act-check {
  background: #28a745;
  border-color: #28a745;
  color: #fff;
}

.activity-item.act-done .act-text {
  color: #334155;
}

.act-num {
  font-weight: bold;
  color: #475569;
  font-size: 10px;
  margin-top: 1px;
  flex-shrink: 0;
}

.act-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.act-right {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.act-wt-pill {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #0b4a82;
  font-size: 9.5px;
  font-weight: bold;
  padding: 0 4px;
  border-radius: 3px;
  line-height: 1.45;
}

.activity-item.act-done .act-wt-pill {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.act-del-btn {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.activity-item:hover .act-del-btn {
  opacity: 1;
}

.add-act-btn {
  margin-top: 6px;
  align-self: flex-start;
  background: transparent;
  border: 1px dashed #94a3b8;
  color: #475569;
  font-size: 9.5px;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.add-act-btn:hover {
  background: #eef6fb;
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

@media (max-width: 1120px) {
  .scope-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .scope-content {
    grid-template-columns: 1fr;
  }
}
