/* resources/css/activity_feed.css */
:root {
  --af-navy: #01203f;
  --af-teal: #22cac3;
  --af-slate-50: #f8fafc;
  --af-slate-100: #f1f5f9;
  --af-slate-200: #e2e8f0;
  --af-slate-400: #94a3b8;
  --af-slate-500: #64748b;
  --af-slate-800: #1e293b;
  --af-white: #ffffff;
  --af-card-radius: 20px;
  --af-icon-radius: 12px;
  --af-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.af-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0 60px 0;
}

.af-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
}

.af-title-area h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--af-navy);
  margin: 0;
  letter-spacing: -1px;
}

.af-title-area p {
  color: var(--af-slate-500);
  font-size: 1rem;
  margin: 8px 0 0 0;
  font-weight: 500;
}

.af-btn-filter {
  background: var(--af-white);
  border: 1px solid var(--af-slate-200);
  color: var(--af-navy);
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.af-btn-filter:hover {
  background: var(--af-slate-50);
  border-color: var(--af-slate-400);
  transform: translateY(-1px);
}

.af-btn-filter i:last-child {
  font-size: 0.7rem;
  background: var(--af-navy);
  color: var(--af-white);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Feed Grouping */
.af-feed-card {
  background: var(--af-white);
  border: 1px solid var(--af-slate-100);
  border-radius: var(--af-card-radius);
  padding: 30px;
  box-shadow: var(--af-shadow);
}

.af-date-group {
  margin-bottom: 40px;
}

.af-date-label {
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--af-slate-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  padding-left: 68px; /* Align with content */
}

/* Activity Item */
.af-item {
  display: flex;
  gap: 20px;
  position: relative;
  padding-bottom: 32px;
}

/* Timeline vertical line */
.af-item::after {
  content: '';
  position: absolute;
  left: 24px;
  top: 48px;
  bottom: 0;
  width: 1px;
  background: var(--af-slate-100);
}

.af-item:last-child::after {
  display: none;
}

.af-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  z-index: 2;
  position: relative;
  background: var(--af-white);
  border: 1px solid var(--af-slate-100);
}

/* Type Colors */
.af-item-request .af-icon-wrap { color: #3b82f6; background: #eff6ff; border-color: #dbeafe; }
.af-item-quotation .af-icon-wrap { color: #f59e0b; background: #fffbeb; border-color: #fef3c7; }
.af-item-contract .af-icon-wrap { color: #10b981; background: #ecfdf5; border-color: #d1fae5; }
.af-item-payment .af-icon-wrap { color: #8b5cf6; background: #f5f3ff; border-color: #ede9fe; }
.af-item-expired .af-icon-wrap { color: #ef4444; background: #fef2f2; border-color: #fee2e2; }

.af-content-card {
  flex-grow: 1;
  background: var(--af-white);
  border: 1px solid var(--af-slate-100);
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: all 0.2s;
}

.af-content-card:hover {
  border-color: var(--af-slate-200);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transform: translateX(4px);
}

.af-item-expired .af-content-card {
  background: #fffafa;
  border-color: #fee2e2;
}

.af-info h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--af-navy);
  margin: 0 0 4px 0;
}

.af-info p {
  margin: 0;
  color: var(--af-slate-500);
  font-size: 0.9rem;
  line-height: 1.5;
}

.af-info p strong {
  color: var(--af-navy);
  font-weight: 700;
}

.af-meta {
  text-align: right;
  flex-shrink: 0;
}

.af-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--af-slate-400);
}

.af-action-area {
  margin-top: 12px;
}

.af-btn-action {
  background: var(--af-white);
  border: 1px solid var(--af-slate-200);
  color: var(--af-navy);
  padding: 6px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.af-btn-action:hover {
  background: var(--af-navy);
  color: var(--af-white);
  border-color: var(--af-navy);
}

.af-footer {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.af-btn-load {
  background: var(--af-white);
  border: 1px solid var(--af-slate-200);
  color: var(--af-navy);
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.af-btn-load:hover {
  border-color: var(--af-slate-400);
  background: var(--af-slate-50);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.af-item {
  animation: fadeIn 0.4s ease forwards;
}

/* Drawer / Filter Sidebar */
.af-drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(1, 32, 63, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.af-drawer-overlay.active {
  display: block;
  opacity: 1;
}

.af-drawer {
  position: fixed;
  top: 0; right: -400px; bottom: 0;
  width: 400px;
  background: var(--af-white);
  z-index: 1001;
  box-shadow: -10px 0 40px rgba(0,0,0,0.1);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.af-drawer.active {
  right: 0;
}

.af-drawer-header {
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--af-slate-100);
}

.af-drawer-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--af-navy);
}

.af-btn-close {
  background: none;
  border: none;
  color: var(--af-slate-400);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  transition: color 0.2s;
}

.af-btn-close:hover {
  color: var(--af-navy);
}

.af-drawer-body {
  padding: 30px;
  flex-grow: 1;
  overflow-y: auto;
}

.af-filter-section {
  margin-bottom: 32px;
}

.af-filter-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--af-slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  display: block;
}

/* Checkboxes */
.af-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.af-checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--af-slate-800);
  font-weight: 600;
}

.af-checkbox-item input {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--af-slate-200);
  cursor: pointer;
  accent-color: #7c2d12; /* Darker red/maroon for checkboxes in design */
}

/* Status Pills */
.af-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.af-pill-btn {
  background: var(--af-white);
  border: 1px solid var(--af-slate-200);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--af-slate-500);
  cursor: pointer;
  transition: all 0.2s;
}

.af-pill-btn:hover {
  background: var(--af-slate-50);
  border-color: var(--af-slate-400);
}

.af-pill-btn.active {
  background: var(--af-navy);
  color: var(--af-white);
  border-color: var(--af-navy);
}

/* Date Range */
.af-date-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.af-date-field label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--af-slate-400);
  margin-bottom: 6px;
  display: block;
}

.af-date-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--af-slate-200);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--af-navy);
  font-weight: 600;
}

.af-quick-dates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--af-slate-100);
  border: 1px solid var(--af-slate-100);
  border-radius: 8px;
  overflow: hidden;
}

.af-quick-btn {
  background: var(--af-white);
  border: none;
  padding: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--af-slate-500);
  cursor: pointer;
  transition: all 0.2s;
}

.af-quick-btn:hover {
  background: var(--af-slate-50);
}

.af-quick-btn.active {
  background: var(--af-slate-50);
  color: var(--af-navy);
  box-shadow: inset 0 0 0 1px var(--af-navy);
  z-index: 1;
}

/* Footer Actions */
.af-drawer-footer {
  padding: 24px 30px;
  border-top: 1px solid var(--af-slate-100);
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 15px;
}

.af-btn-reset {
  background: var(--af-white);
  border: 1px solid var(--af-slate-200);
  color: var(--af-navy);
  padding: 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

.af-btn-apply {
  background: var(--af-navy);
  border: none;
  color: var(--af-white);
  padding: 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .af-header { flex-direction: column; align-items: flex-start; gap: 20px; }
  .af-content-card { flex-direction: column; gap: 12px; }
  .af-meta { text-align: left; }
  .af-date-label { padding-left: 0; }
  .af-item::after { left: 24px; }
}

@media (max-width: 480px) {
  .af-drawer { width: 100%; right: -100%; }
}
