/* ============================================ */

/* POST UPDATE PAGE STYLES */

/* ============================================ */

/* Selected Child Card */
.selected-child-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--accent);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.selected-child-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.selected-child-info {
  flex: 1;
}

.selected-child-info h5 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.selected-child-info p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Modal Children Grid (only in select child modal) */
.modal .children-grid,
#selectChildModal .children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  max-height: 500px;
  overflow-y: auto;
}

.child-grid-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.child-grid-card:hover {
  border-color: var(--primary-solid);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.child-grid-card img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.child-grid-info {
  flex: 1;
  min-width: 0;
}

.child-grid-info h6 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.child-grid-info p {
  margin: 0 0 0.25rem 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.child-grid-info p i {
  font-size: 0.75rem;
}

.child-grid-badge {
  background: var(--primary-solid);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  align-self: flex-start;
}

.children-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.children-grid-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}


/* PAGE HEADER */

.page-header-admin {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-bottom: 2rem;
  overflow: visible !important;
}

.header-content-admin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.header-text {
  flex: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--primary-solid);
}

.page-title-admin {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.page-subtitle-admin {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* POST UPDATE SECTION */

.post-update-section {
  padding: 0 0 3rem;
}

/* FORM CARD */

.form-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 4px 10px var(--shadow);
  border: 1px solid var(--border-color);
}

.form-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title-form {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* CHILD PREVIEW CARD */

.child-preview-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--accent);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.preview-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.preview-info {
  flex: 1;
}

.preview-info h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.preview-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.badge-sponsor-count {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--primary-solid);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

/* UPLOAD ZONE */

.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--accent);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--primary-solid);
  background: var(--card-bg);
}

.upload-zone i {
  font-size: 3rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: block;
}

.upload-zone p {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.upload-zone small {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* PHOTOS PREVIEW */

.photos-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(229, 57, 53, 0.9);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.photo-remove-btn:hover {
  background: var(--danger);
  transform: scale(1.1);
}

/* NOTIFICATION OPTIONS */

.notification-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-check {
  padding: 1rem;
  background: var(--accent);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.form-check:hover {
  background: var(--card-bg);
}

.form-check-input {
  width: 20px;
  height: 20px;
  margin-right: 1rem;
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
  margin-bottom: 0;
}

.form-check-label strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.form-check-label p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* FORM ACTIONS */

.form-actions-post {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

/* SIDEBAR CARD */

.sidebar-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 10px var(--shadow);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  /*color: var(--text-primary);*/
}

/* RECENT UPDATES LIST */

.recent-updates-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recent-update-item {
  padding: 1rem;
  background: var(--accent);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.update-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.update-type {
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.update-type.academic {
  background: #2196F3;
}

.update-type.achievement {
  background: #FFD700;
  color: #1C1C1C;
}

.update-type.general {
  background: #9E9E9E;
}

.update-type.health {
  background: #4CAF50;
}

.update-header small {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.recent-update-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.recent-update-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* TIPS CARD */

.tips-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: var(--text-secondary);
}

.tips-card .sidebar-title {
  color: var(--text-primary);
}

.tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tips-list i {
  color: #FFD700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* SUCCESS MODAL */

.success-icon {
  width: 100px;
  height: 100px;
  background: rgba(76, 175, 80, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 4rem;
  color: var(--success);
}

/* CHARACTER COUNT */

#charCount {
  color: var(--text-secondary);
}

#charCount.valid {
  color: var(--success);
}

#charCount.invalid {
  color: var(--danger);
}

/* MOBILE RESPONSIVE */

@media (max-width: 992px) {
  .form-card {
    padding: 1.5rem;
  }
}

@media (max-width: 992px) {
  .form-actions-post {
    flex-direction: column;
  }
}

@media (max-width: 992px) {
  .form-actions-post .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page-title-admin {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .child-preview-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .photos-preview {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

@media (max-width: 576px) {
  .page-header-admin {
    padding: 1.5rem 0;
  }
}

@media (max-width: 576px) {
  .form-card {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .section-title-form {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .upload-zone {
    padding: 2rem 1rem;
  }
}

/* DARK MODE */

[data-bs-theme="dark"] .page-header-admin,
.dark-mode .page-header-admin {
  background: var(--card-bg);
  border-bottom-color: var(--border-color);
}

[data-bs-theme="dark"] .form-card,
.dark-mode .form-card,
[data-bs-theme="dark"] .sidebar-card,
.dark-mode .sidebar-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-bs-theme="dark"] .child-preview-card,
.dark-mode .child-preview-card,
[data-bs-theme="dark"] .form-check,
.dark-mode .form-check,
[data-bs-theme="dark"] .recent-update-item,
.dark-mode .recent-update-item {
  background: var(--accent);
  border-color: var(--border-color);
}

[data-bs-theme="dark"] .upload-zone,
.dark-mode .upload-zone {
  background: var(--accent);
  border-color: var(--border-color);
}

[data-bs-theme="dark"] .upload-zone:hover,
.dark-mode .upload-zone:hover {
  background: var(--card-bg);
}