/* Photo System CSS - Extends existing modal system without breaking changes */

/* ==============================================
   PHOTO UPLOAD MODAL STYLES
   ============================================== */

.photo-upload-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

.upload-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.user-avatar .avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.user-details h3 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.user-details p {
  margin: 0;
  font-size: 12px;
  color: #6c757d;
}

.upload-queue-section h4,
.upload-settings h4 {
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.upload-queue {
  min-height: 100px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #e9ecef;
}

.queue-empty {
  text-align: center;
  color: #6c757d;
}

.queue-empty .empty-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.queue-empty p {
  margin: 0;
  font-size: 12px;
}

.upload-settings {
  flex: 1;
}

.setting-group {
  margin-bottom: 15px;
}

.setting-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #495057;
  margin-bottom: 4px;
}

.setting-group select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 12px;
  background: white;
}

.setting-group label input[type="checkbox"] {
  margin-right: 6px;
}

.setting-group label span {
  font-size: 12px;
}

/* Photo Upload Main Area */
.photo-upload-main {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.upload-header {
  margin-bottom: 20px;
  text-align: center;
}

.upload-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.upload-header p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
}

.upload-area-container {
  flex: 1;
  position: relative;
}

/* Photo Drop Zone */
.photo-drop-zone {
  border: 3px dashed #ced4da;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-drop-zone:hover,
.photo-drop-zone.dragover {
  border-color: #007bff;
  background: #e7f3ff;
  transform: scale(1.02);
}

.drop-zone-content .upload-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.7;
}

.drop-zone-content h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.drop-zone-content p {
  margin: 0 0 5px 0;
  color: #6c757d;
  font-size: 14px;
}

.drop-zone-content .format-note {
  font-size: 12px;
  color: #007bff;
  font-weight: 500;
}

.btn-browse {
  margin-top: 15px;
  padding: 10px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-browse:hover {
  background: #0056b3;
}

/* Photo Editor Container */
.photo-editor-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.editor-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.editor-actions {
  display: flex;
  gap: 10px;
}

.btn-secondary,
.btn-primary {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #545b62;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
}

.editor-workspace {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.photo-canvas-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  padding: 20px;
}

#photo-canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.editor-tools {
  width: 280px;
  border-left: 1px solid #e9ecef;
  background: white;
  display: flex;
  flex-direction: column;
}

.tool-tabs {
  display: flex;
  border-bottom: 1px solid #e9ecef;
}

.tool-tab {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.tool-tab:hover {
  background: #e9ecef;
  color: #495057;
}

.tool-tab.active {
  background: white;
  color: #007bff;
  border-bottom-color: #007bff;
}

.tool-panels {
  flex: 1;
  overflow-y: auto;
}

.tool-panel {
  display: none;
  padding: 20px;
}

.tool-panel.active {
  display: block;
}

/* Crop Panel */
.aspect-ratios {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aspect-btn {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  background: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.aspect-btn:hover {
  border-color: #007bff;
  background: #e7f3ff;
}

.aspect-btn.active {
  border-color: #007bff;
  background: #007bff;
  color: white;
}

/* Adjustment Panel */
.adjustment-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-group label {
  font-size: 12px;
  font-weight: 500;
  color: #495057;
}

.control-group input[type="range"] {
  width: 100%;
  margin: 5px 0;
}

.control-group .value {
  font-size: 11px;
  color: #6c757d;
  text-align: right;
}

/* Filter Panel */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.filter-btn {
  padding: 8px;
  border: 1px solid #ced4da;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  aspect-ratio: 1;
}

.filter-btn:hover {
  border-color: #007bff;
}

.filter-btn.active {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.filter-preview {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  padding: 10px 5px;
}

/* Text Panel */
.text-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.text-controls input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 12px;
}

.text-style-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.text-style-controls select,
.text-style-controls input {
  font-size: 12px;
}

/* Photo Gallery Preview */
.photo-gallery-preview {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  display: flex;
  flex-direction: column;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
}

.gallery-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

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

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.upload-caption-section {
  padding: 20px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
}

.upload-caption-section label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  margin-bottom: 8px;
}

.upload-caption-section textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  min-height: 60px;
}

.caption-help {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 12px;
  color: #6c757d;
}

/* ==============================================
   PHOTO VIEWER MODAL STYLES
   ============================================== */

.photo-viewer-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.photo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
}

.photo-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar .avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.author-details h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.author-details p {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: #6c757d;
}

.upload-time {
  font-size: 12px;
  color: #999;
}

.photo-actions {
  display: flex;
  gap: 8px;
}

.photo-actions button {
  padding: 6px 12px;
  border: 1px solid #ced4da;
  background: white;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-actions button:hover {
  border-color: #007bff;
  background: #e7f3ff;
}

.photo-display-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.photo-main-image {
  text-align: center;
  margin-bottom: 15px;
}

.main-photo-img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.photo-caption {
  max-width: 600px;
  text-align: center;
}

.photo-caption p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
}

.photo-engagement {
  padding: 15px 20px;
  border-top: 1px solid #e9ecef;
}

.engagement-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.stat-item {
  font-size: 14px;
  color: #6c757d;
}

.reaction-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reaction-buttons {
  display: flex;
  gap: 8px;
}

.reaction-btn {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  background: white;
  border-radius: 20px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reaction-btn:hover {
  transform: scale(1.1);
  border-color: #007bff;
}

.reaction-btn.active {
  border-color: #007bff;
  background: #e7f3ff;
  transform: scale(1.1);
}

.btn-save-photo {
  padding: 8px 16px;
  border: 1px solid #007bff;
  background: white;
  color: #007bff;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-save-photo:hover {
  background: #007bff;
  color: white;
}

.login-prompt {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
}

.login-prompt p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

.login-prompt a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.comments-section {
  border-top: 1px solid #e9ecef;
  padding: 20px;
  background: #f8f9fa;
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.comments-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.btn-load-more-comments {
  padding: 6px 12px;
  border: 1px solid #ced4da;
  background: white;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.add-comment-form {
  margin-bottom: 20px;
}

.comment-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
}

.comment-input-group textarea {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  resize: none;
}

.btn-post-comment {
  padding: 10px 16px;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-post-comment:hover {
  background: #0056b3;
}

.comment-help {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6c757d;
}

.emoji-trigger {
  cursor: pointer;
}

.emoji-trigger:hover {
  color: #007bff;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.comment-item {
  display: flex;
  gap: 12px;
}

.comment-avatar .avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.comment-time {
  font-size: 11px;
  color: #999;
}

.comment-text {
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  margin-bottom: 6px;
}

.comment-actions {
  display: flex;
  gap: 12px;
}

.comment-like-btn,
.comment-reply-btn {
  padding: 4px 8px;
  border: none;
  background: transparent;
  font-size: 12px;
  color: #6c757d;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.comment-like-btn:hover,
.comment-reply-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.no-comments {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
  font-style: italic;
}

/* ==============================================
   PHOTO GALLERY MODAL STYLES
   ============================================== */

.gallery-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

.gallery-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.gallery-stats {
  display: flex;
  justify-content: space-around;
  padding: 15px 0;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gallery-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-upload,
.btn-create-collection {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-upload {
  background: #007bff;
  color: white;
}

.btn-upload:hover {
  background: #0056b3;
}

.btn-create-collection {
  background: #6c757d;
  color: white;
}

.btn-create-collection:hover {
  background: #545b62;
}

.gallery-filters h4,
.gallery-sort h4 {
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-btn {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  background: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.filter-btn:hover {
  border-color: #007bff;
  background: #e7f3ff;
}

.filter-btn.active {
  border-color: #007bff;
  background: #007bff;
  color: white;
}

.gallery-sort select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 12px;
  background: white;
}

/* Gallery Main Area */
.photo-gallery-main {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
}

.gallery-title h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

.gallery-title p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

.gallery-view-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.view-mode-selector {
  display: flex;
  border: 1px solid #ced4da;
  border-radius: 4px;
  overflow: hidden;
}

.view-mode-btn {
  padding: 8px 12px;
  border: none;
  background: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-right: 1px solid #ced4da;
}

.view-mode-btn:last-child {
  border-right: none;
}

.view-mode-btn:hover {
  background: #f8f9fa;
}

.view-mode-btn.active {
  background: #007bff;
  color: white;
}

.gallery-search {
  display: flex;
  align-items: center;
  gap: 5px;
}

.gallery-search input {
  padding: 6px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 12px;
  width: 150px;
}

.search-btn {
  padding: 6px 10px;
  border: 1px solid #ced4da;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.search-btn:hover {
  background: #f8f9fa;
}

.gallery-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.gallery-view {
  display: none;
}

.gallery-view.active {
  display: block;
}

/* 4:5 Photo Grid - Core Feature */
.photo-grid-4x5 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px;
  margin-bottom: 20px;
}

.photo-grid-item {
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  background: #f8f9fa;
}

.photo-item-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.photo-grid-item:hover img {
  transform: scale(1.05);
}

.photo-overlay-stats {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
}

.photo-overlay-stats span {
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-grid-item:hover .photo-overlay {
  opacity: 1;
}

.photo-actions {
  display: flex;
  gap: 10px;
}

.photo-action-btn {
  padding: 8px 12px;
  border: 1px solid white;
  background: rgba(255,255,255,0.9);
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-action-btn:hover {
  background: white;
  transform: scale(1.05);
}

/* Collections Grid */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.collection-item {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.collection-item:hover {
  transform: translateY(-4px);
}

.collection-cover {
  position: relative;
  aspect-ratio: 4/5;
}

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

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

.collection-info h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.collection-info p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

/* Gallery Empty State */
.gallery-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.gallery-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.7;
}

.gallery-empty h3 {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.gallery-empty p {
  margin: 0 0 20px 0;
  font-size: 14px;
  line-height: 1.5;
}

.btn-upload-first {
  padding: 12px 24px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-upload-first:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

/* Gallery Pagination */
.gallery-pagination {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #e9ecef;
}

.btn-load-more {
  padding: 12px 24px;
  border: 1px solid #007bff;
  background: white;
  color: #007bff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-load-more:hover {
  background: #007bff;
  color: white;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
  /* Mobile optimizations for photo modals */
  
  .photo-grid-4x5 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
  }
  
  .gallery-view-controls {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  .gallery-search input {
    width: 100%;
  }
  
  .editor-workspace {
    flex-direction: column;
  }
  
  .editor-tools {
    width: 100%;
    border-left: none;
    border-top: 1px solid #e9ecef;
    max-height: 200px;
  }
  
  .tool-tabs {
    justify-content: space-around;
  }
  
  .photo-actions {
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .photo-actions button {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .reaction-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .comment-input-group {
    flex-direction: column;
  }
  
  .btn-post-comment {
    align-self: flex-end;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .photo-grid-4x5 {
    gap: 0;
  }
  
  .upload-header h2 {
    font-size: 20px;
  }
  
  .photo-header {
    padding: 10px 15px;
  }
  
  .photo-display-container {
    padding: 15px;
  }
  
  .gallery-header {
    padding: 10px 15px;
  }
  
  .gallery-content {
    padding: 15px;
  }
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */

.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #dc3545;
  font-size: 14px;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

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

.slide-up {
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}