/* use for hidden and display logging and admin pannel */
.hidden-section {
  display: none !important;
}

.show-flex {
  display: flex !important;
}

/* status-bage  */

.status-badge {
  text-align: center;
  font-size: 1.4rem;
  border-radius: 12px;
  padding: 4px 12px;
  color: #fff;
  transition: transform 0.2s ease, background-color 0.2s ease;
  cursor: default;
}

.status-badge:hover {
  transform: translateY(-2px);
}



.tech-chip {
  display: inline-block;
  background-color: var(--secondary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 1.2rem;
  margin: 2px;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.tech-chip:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
}

.more-chip {
  display: inline-block;
  background-color: var(--gray);
  color: #fff;
  padding: 4px 8px;
  border-radius: 50%;
  font-size: 1rem;
  margin-left: 3px;
  cursor: default;
}



/**********************************Delete and Edit buttons*********************** */
.action-buttons {
  display: flex;
  gap: 8px;
}

.table-btn {
  width: 3.6rem;
  height: 3.6rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-edit {
  background: #3182ce;
}

.btn-edit:hover {
  transform: translateY(-2px);
}

.btn-delete {
  background: #e53e3e;
}

.btn-delete:hover {
  transform: translateY(-2px);
}

.edit-icon {
  height: 2.4rem;
  width: 2.4rem;
}

.delete-icon {
  height: 2.4rem;
  width: 2.4rem;
}

/**********************************Table contributors image*********************** */

.contributor-image-table {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
  transition: all 0.3s ease;
}

.contributor-image-table:hover {
  border: 3px solid #667eea;
  transform: scale(1.1);
}

.news-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/********************************** Forms*********************** */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
  font-size: 1.4rem;
  color: #2d3748;
}

.form-icon {
  height: 2.4rem;
  width: 2.4rem;
}

.upload-icon {
  height: 4.8rem;
  width: 4.8rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1.6rem;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
  color: #a0aec0;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  margin: 3% auto;
  padding: 0;
  border: none;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}

/* Make scroll smooth */
.modal-content::-webkit-scrollbar {
  width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  background: #7488dfff;
  color: #fff;
  border-bottom: none;
  padding: 2.4rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 2.8rem;
  cursor: pointer;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-body {
  padding: 3rem;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--gray-light);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Image Upload Section */
.image-upload-section {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.image-upload-label {
  cursor: pointer;
}

.image-upload-area {
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.image-upload-area:hover {
  transform: scale(1.05);
}

#imagePreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.upload-placeholder {
  width: 100%;
  height: 100%;
  border: 3px dashed #cbd5e0;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f7fafc;
  color: #667eea;
  transition: all 0.3s ease;
}

.upload-placeholder:hover {
  border-color: #667eea;
  background: #edf2f7;
}

.upload-placeholder svg {
  margin-bottom: 0.8rem;
}

.upload-placeholder span {
  font-size: 1.3rem;
  font-weight: 500;
}

/* image for news form */
.image-upload-wrapper-news {
  position: relative;
}

.image-upload-area-news {
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  background: #f8f9fa;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.image-upload-area-news:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.image-upload-area-news.has-image {
  padding: 0;
  border: none;
}

.uploadNews-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #667eea;
}

.uploadNews-placeholder svg {
  width: 48px;
  height: 48px;
}

.uploadNews-placeholder span {
  font-size: 14px;
  font-weight: 600;
}

.uploadNews-placeholder small {
  font-size: 12px;
  color: #a0aec0;
  font-weight: normal;
}
#imagePreview-news {
  display: none;
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
}

#imagePreview-news.show {
  display: block;
}

.remove-image {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(229, 62, 62, 0.95);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.remove-image:hover {
  background: #c53030;
  transform: scale(1.15);
}

/* Image upload for project form */
.image-upload-wrapper-project {
  position: relative;
}

.image-upload-area-project {
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  background: #f8f9fa;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.image-upload-area-project:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.image-upload-area-project.has-image {
  padding: 0;
  border: none;
}

.uploadProject-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #667eea;
}

.uploadProject-placeholder svg {
  width: 48px;
  height: 48px;
}

.uploadProject-placeholder span {
  font-size: 14px;
  font-weight: 600;
}

.uploadProject-placeholder small {
  font-size: 12px;
  color: #a0aec0;
  font-weight: normal;
}

#imagePreview-project {
  display: none;
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
}

#imagePreview-project.show {
  display: block;
}



/* Character Counter */
.char-counter {
  text-align: right;
  font-size: 12px;
  color: #a0aec0;
  margin-top: 6px;
}

/* multiple contributors-contributors table */
.author-chip {
  display: flex;
  background-color: #7488df;
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  margin: 2px 4px 2px 0;
  font-size: 1.4rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
  cursor: default;
}

.author-chip:hover,
.auhtor-blog-chip:hover {
  background-color: #5f72d1;
  transform: translateY(-2px);
}

.author-blog {
  background-color: #7488df;
  text-align: center;
  font-size: 1.4rem;
  border-radius: 12px;
  padding: 4px 12px;
  color: #fff;
  transition: transform 0.2s ease, background-color 0.2s ease;
  cursor: default;
}

.author-blog:hover {
  background-color: #5f72d1;
  transform: translateY(-2px);
}

/* --- Custom Select2 Theme for Admin Panel --- */

/* Match overall font and size */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
  background-color: #f8f9fa;
  border: 1px solid #d0d4e4;
  border-radius: 10px;
  min-height: 42px;
  font-size: 1.5rem;
  font-family: inherit;
  color: #333;
  transition: all 0.2s ease;
  padding: 4px 8px;
}

/* Hover + Focus */
.select2-container--default .select2-selection--multiple:focus,
.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--multiple:hover,
.select2-container--default .select2-selection--single:hover {
  border-color: #7488df;
  box-shadow: 0 0 0 3px rgba(116, 136, 223, 0.15);
}

/* Selected items (tags) */
.select2-container--default .select2-selection__choice {
  background-color: #7488df;
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 4px 8px;
  margin-top: 5px;
  font-size: 1.4rem;
}

/* Remove button inside tag */
.select2-container--default .select2-selection__choice__remove {
  color: #fff;
  margin-left: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}
.select2-container--default .select2-selection__choice__remove:hover {
  color: #ffdddd;
}

/* Dropdown panel */
.select2-container--default .select2-results > .select2-results__options {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  font-size: 1.5rem;
}

/* Option hover + selected */
.select2-container--default .select2-results__option--highlighted {
  background-color: #7488df;
  color: #fff;
}
.select2-container--default .select2-results__option--selected {
  background-color: #e4e8ff;
  color: #333;
}

/* Search box inside dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid #d0d4e4;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.5rem;
}

/* Dropdown arrow */
.select2-container--default .select2-selection__arrow b {
  border-color: #7488df transparent transparent transparent;
}

/* --- Beautiful Selected Tags (Authors) --- */
.select2-container--default .select2-selection__choice {
  background-color: #7488df !important; /* your main blue */
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
}

/* Hover effect for tag */
.select2-container--default .select2-selection__choice:hover {
  background-color: #5f72d1 !important;
  transform: translateY(-1px);
}

/* Remove (x) button */
.select2-container--default .select2-selection__choice__remove {
  color: #fff !important;
  font-size: 1.6rem;
  font-weight: bold;
  margin-right: 3px;
  cursor: pointer;
  transition: 0.2s ease;
}








/* ************Popup Container*************** */
.popup {
  position: fixed;
  top: 40px;
  right: 20px;
  background: #fff;
  color: #000;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 9999;
  border-left: 5px solid transparent;
}

/* ✅ Success color */
.popup.success {
  border-left-color: #2ecc71;
}

/* ❌ Error color */
.popup.error {
   border-left-color: #e74c3c; /* red left border */
}

/* Fade animation */
.popup.show {
  opacity: 1;
  transform: translateY(0);
}

/* Icon styling */
#popupIcon {
  font-size: 18px;
}


.popup.show {
  animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}






/* Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10px auto;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .modal-body {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
