/* Material Design 3 styles for Activities interface */

/* ===== MD3 Bottom Sheet ===== */
.md3-bottom-sheet {
  border-radius: 28px 28px 0 0 !important;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.md3-bottom-sheet .offcanvas-header {
  padding: 8px 24px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
}

/* Bottom sheet drag handle */
.md3-bottom-sheet .offcanvas-header::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
}

.md3-bottom-sheet .offcanvas-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0;
  margin-top: 12px;
}

.md3-bottom-sheet .offcanvas-body {
  padding: 24px;
}

/* ===== Activity Cards ===== */
.activity-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-card:last-child {
  margin-bottom: 0;
}

.activity-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.2);
}

.activity-header {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.activity-content {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.87);
  word-break: break-word;
}

/* ===== MD3 Buttons ===== */
.btn-md3-filled {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 24px;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-md3-filled:hover {
  background: #1565c0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 3px 6px rgba(0, 0, 0, 0.15);
  color: #fff;
}

.btn-md3-filled:active {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-md3-outlined {
  background: transparent;
  color: #1976d2;
  border: 1px solid rgba(25, 118, 210, 0.5);
  border-radius: 20px;
  padding: 10px 24px;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.1px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-md3-outlined:hover {
  background: rgba(25, 118, 210, 0.08);
  border-color: #1976d2;
  color: #1565c0;
}

.btn-md3-outlined:active {
  background: rgba(25, 118, 210, 0.12);
}

.btn-md3-text {
  background: transparent;
  color: #1976d2;
  border: none;
  border-radius: 20px;
  padding: 10px 12px;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.1px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-md3-text:hover {
  background: rgba(25, 118, 210, 0.08);
  color: #1565c0;
}

.btn-md3-text:active {
  background: rgba(25, 118, 210, 0.12);
}

.btn-md3-danger {
  background: transparent;
  color: #d32f2f;
  border: 1px solid rgba(211, 47, 47, 0.5);
  border-radius: 20px;
  padding: 10px 24px;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.1px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-md3-danger:hover {
  background: rgba(211, 47, 47, 0.08);
  border-color: #d32f2f;
  color: #c62828;
}

.btn-md3-danger:active {
  background: rgba(211, 47, 47, 0.12);
}

/* ===== MD3 Form Fields ===== */
.md3-form-field {
  position: relative;
  margin-bottom: 24px;
}

.md3-form-field label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1px;
  color: #1976d2;
  margin-bottom: 8px;
  display: block;
}

.md3-form-field .form-select,
.md3-form-field .form-control {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.38);
  padding: 14px 16px;
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
}

.md3-form-field .form-select:focus,
.md3-form-field .form-control:focus {
  border-color: #1976d2;
  border-width: 2px;
  padding: 13px 15px; /* Adjust to compensate for thicker border */
  box-shadow: none;
  outline: none;
}

.md3-form-field .form-control::placeholder {
  color: rgba(0, 0, 0, 0.38);
}

/* ===== Content Display ===== */
.md3-content-display {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  padding: 16px;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.87);
  min-height: 120px;
}

/* ===== Participants Chips ===== */
.participant-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(25, 118, 210, 0.12);
  color: #1976d2;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 4px 4px 4px 0;
}

.participant-chip .material-icons {
  font-size: 18px;
  margin-right: 4px;
}

/* ===== Activities Container ===== */
.activities-container {
  padding-left: 16px;
  padding-right: 16px;
  margin-top: 24px;
  margin-bottom: 16px;
}

/* ===== Activity List Section Header ===== */
.activities-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  margin-bottom: 16px;
}

.activities-section-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.87);
  margin: 0;
}

/* ===== FAB for Add Activity ===== */
.fab-add-activity {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 12px 20px;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.1px;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2), 0 1px 18px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fab-add-activity:hover {
  background: #1565c0;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3), 0 3px 14px rgba(0, 0, 0, 0.18);
  color: #fff;
}

.fab-add-activity:active {
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* ===== Button Actions Group ===== */
.md3-actions-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* ===== Close button (X) in MD3 style ===== */
.md3-bottom-sheet .btn-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  opacity: 0.6;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 8px;
}

.md3-bottom-sheet .btn-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.08);
}

/* ===== Info Cards ===== */
.md3-info-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  margin-left: 16px;
  margin-right: 16px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.md3-info-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.2);
}

.md3-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.md3-info-value {
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.87);
  word-break: break-word;
}

.md3-info-value a {
  color: #1976d2;
  text-decoration: none;
  transition: color 0.2s;
}

.md3-info-value a:hover {
  color: #1565c0;
  text-decoration: underline;
}

/* ===== Page Header ===== */
.md3-page-header {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: #fff;
  padding: 24px 20px;
  border-radius: 0 0 24px 24px;
  margin: -20px -20px 20px -20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.md3-page-title {
  font-size: 1.75rem;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0;
}

/* ===== Description Section ===== */
.md3-description-section {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  margin-left: 16px;
  margin-right: 16px;
}

.md3-section-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: rgba(0, 0, 0, 0.87);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.md3-description-content {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.87);
  min-height: 120px;
  margin-bottom: 12px;
}

.md3-description-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
}

.md3-description-actions .btn-md3-text {
  padding: 8px 16px;
  border-radius: 12px 12px 0 0;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.md3-description-actions .btn-md3-text.active {
  background: rgba(25, 118, 210, 0.08);
  border-bottom-color: #1976d2;
  color: #1976d2;
}

.md3-description-hint {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.6);
  margin-top: 8px;
  font-style: italic;
}

/* ===== Business Cards Section ===== */
.md3-business-cards-section {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
  margin-bottom: 16px;
  margin-left: 16px;
  margin-right: 16px;
}

.md3-business-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.md3-business-card-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.md3-business-card-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.md3-business-card-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.md3-business-card-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(211, 47, 47, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s;
}

.md3-business-card-item:hover .md3-business-card-delete {
  opacity: 1;
}

.md3-business-card-delete:hover {
  background: #c62828;
}

.md3-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: rgba(0, 0, 0, 0.38);
}

.md3-empty-state-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 12px;
}

/* ===== Chip/Badge ===== */
.md3-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(25, 118, 210, 0.12);
  color: #1976d2;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
}

.md3-chip-outlined {
  background: transparent;
  border: 1px solid rgba(25, 118, 210, 0.5);
}

/* ===== Icon Buttons ===== */
.md3-icon-button {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: rgba(0, 0, 0, 0.6);
}

.md3-icon-button:hover {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.87);
}

.md3-icon-button:active {
  background: rgba(0, 0, 0, 0.12);
}

/* ===== Divider ===== */
.md3-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
  margin: 16px 0;
  border: none;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
  .md3-bottom-sheet {
    max-height: 90vh;
  }

  .md3-bottom-sheet .offcanvas-body {
    padding: 16px;
  }

  .md3-page-header {
    margin: 0 0 20px 0;
    border-radius: 0 0 20px 20px;
  }

  .md3-business-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
}
