/* Properties Renovation - Custom Styles */

/* Light Theme */
:root {
  --sidebar-bg: #f8f9fa;
  --sidebar-border: #dee2e6;
  --primary-color: #0d6efd;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
}

body {
  background-color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Login Page */
#login-page {
  background-color: #f8f9fa;
}

#login-page .card {
  border-radius: 10px;
}

/* Sidebar */
.sidebar {
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  min-height: calc(100vh - 56px);
  padding: 15px 0;
  overflow-y: auto;
}

.sidebar-content {
  padding: 0 15px;
}

.sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-left: 10px;
}

.project-item {
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.2s;
}

.project-item:hover {
  background-color: #e9ecef;
}

.project-item.active {
  background-color: var(--primary-color);
  color: white;
}

.project-name {
  font-weight: 500;
  margin-bottom: 5px;
}

.progress {
  height: 6px;
  margin-top: 5px;
  border-radius: 3px;
}

/* Main Content */
.main-content {
  background-color: white;
  min-height: calc(100vh - 56px);
  padding: 20px;
}

#no-project {
  background-color: white;
  border-radius: 10px;
  padding: 50px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Notes */
.note-card {
  border: 1px solid var(--sidebar-border);
  border-radius: 8px;
  margin-bottom: 15px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.note-header {
  padding: 12px 15px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.note-title {
  font-weight: 600;
  margin: 0;
}

.note-actions {
  display: flex;
  gap: 5px;
}

.note-body {
  padding: 15px;
}

.note-body p {
  margin-bottom: 10px;
}

.note-body p:last-child {
  margin-bottom: 0;
}

.note-date {
  font-size: 0.8rem;
  color: #6c757d;
}

/* To-Dos */
.todo-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid var(--sidebar-border);
  border-radius: 8px;
  margin-bottom: 10px;
  background-color: white;
  transition: background-color 0.2s;
}

.todo-item:hover {
  background-color: #f8f9fa;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: #6c757d;
}

.todo-checkbox {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  cursor: pointer;
}

.todo-text {
  flex: 1;
  margin: 0;
}

.todo-actions {
  display: flex;
  gap: 5px;
}

/* Gallery - List View */
.gallery-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid var(--sidebar-border);
  border-radius: 8px;
  background-color: white;
  transition: background-color 0.2s;
}

.gallery-item:hover {
  background-color: #f8f9fa;
}

.gallery-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  margin-right: 15px;
  cursor: pointer;
}

.gallery-info {
  flex: 1;
}

.gallery-name {
  font-weight: 500;
  margin-bottom: 3px;
}

.gallery-tags {
  font-size: 0.8rem;
  color: #6c757d;
}

.gallery-actions {
  display: flex;
  gap: 5px;
}

/* Gallery - Thumbnail View */
.gallery-thumbnail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.thumbnail-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.thumbnail-item:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.thumbnail-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 10px;
  color: white;
}

.thumbnail-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumbnail-tags {
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Gallery - Carousel View */
.carousel-container {
  max-width: 1200px;
  margin: 0 auto;
}

.main-photo-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto 20px;
}

.main-photo {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.main-photo-info {
  text-align: center;
  margin-top: 15px;
}

.main-photo-info h5 {
  margin-bottom: 5px;
  font-weight: 600;
}

.main-photo-info p {
  color: #6c757d;
  margin: 0;
}

.carousel-btn-prev,
.carousel-btn-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background-color 0.2s;
}

.carousel-btn-prev:hover,
.carousel-btn-next:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.carousel-btn-prev {
  left: 10px;
}

.carousel-btn-next {
  right: 10px;
}

.thumbnail-container {
  max-width: 1000px;
  margin: 0 auto;
}

.thumbnail-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.thumbnail-row .thumbnail-item {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.thumbnail-row .thumbnail-item.active {
  border-color: var(--primary-color);
}

.thumbnail-row .thumbnail-item:hover {
  opacity: 0.8;
}

.thumbnail-row .thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-item img {
  max-height: 600px;
  object-fit: contain;
  border-radius: 8px;
}

.carousel-caption {
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 10px 15px;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 40px;
  height: 40px;
  background-size: 24px 24px;
}

/* Drag and Drop Upload */
.drop-zone {
  border: 2px dashed var(--sidebar-border);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  margin-bottom: 15px;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary-color);
  background-color: rgba(13, 110, 253, 0.05);
}

.drop-zone i {
  font-size: 2rem;
  color: #6c757d;
  margin-bottom: 10px;
}

.drop-zone p {
  margin: 0;
  color: #6c757d;
}

/* File Preview */
.file-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 5px;
  overflow: hidden;
}

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

.preview-item .remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--danger-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* Admin Panel */
#admin-page {
  padding: 20px;
}

.status-badge {
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 20px;
}

.status-active {
  background-color: #d1e7dd;
  color: #0f5132;
}

.status-banned {
  background-color: #f8d7da;
  color: #842029;
}

/* Buttons */
.btn-group .view-btn {
  border-radius: 0;
}

.btn-group .view-btn:first-child {
  border-radius: 5px 0 0 5px;
}

.btn-group .view-btn:last-child {
  border-radius: 0 5px 5px 0;
}

.btn-group .view-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* View button icons */
.btn-group .view-btn i {
  font-size: 1.1rem;
}

/* Toast */
#liveToast {
  max-width: 400px;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--sidebar-border);
  }

  .main-content {
    padding: 15px;
  }

  .gallery-thumbnail {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .carousel-item img {
    max-height: 300px;
  }
}

/* Loading Spinner */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
}

/* Photo Modal */
#fullPhotoModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1050;
  display: none;
  cursor: pointer;
}

#fullPhotoModal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

#fullPhotoModal .modal-dialog {
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  pointer-events: none;
}

#fullPhotoModal .modal-body {
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

#fullPhotoModal .modal-body img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  pointer-events: auto;
}

#fullPhotoModal .carousel-control-prev,
#fullPhotoModal .carousel-control-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  opacity: 1;
  z-index: 1060;
  pointer-events: auto;
  cursor: pointer;
}

#fullPhotoModal .carousel-control-prev {
  left: 20px;
}

#fullPhotoModal .carousel-control-next {
  right: 20px;
}

#fullPhotoModal .carousel-control-prev-icon,
#fullPhotoModal .carousel-control-next-icon {
  width: 30px;
  height: 30px;
}

#modalBackdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1049;
}
