/* ========================================
   FILE ATTACHMENT STYLES
   ======================================== */

.attachment-panel {
  background: #fff;
  border: 1px solid #ddd;
  border-top: 0;
  margin-top: 10px;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.attachment-header h4 {
  margin: 0;
  font-size: 16px;
  color: #696969;
  display: flex;
  align-items: center;
  gap: 8px;
}

.attachment-header .btn-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attachment-header .btn-close:hover {
  color: #696969;
}

.attachment-upload-area {
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.upload-zone {
  border: 2px dashed #ddd;
  border-radius: 5px;
  padding: 40px 20px;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #2196F3;
  background: #f0f8ff;
}

.upload-zone i {
  font-size: 32px;
  color: #ddd;
  margin-bottom: 10px;
  display: block;
}

.upload-zone:hover i,
.upload-zone.drag-over i {
  color: #2196F3;
}

.upload-zone p {
  font-size: 16px;
  color: #696969;
  margin: 10px 0 5px 0;
}

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

.upload-progress {
  padding: 20px;
  text-align: center;
}

.progress-bar {
  background: #eee;
  border-radius: 10px;
  height: 6px;
  margin-bottom: 10px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #2196F3, #4CAF50);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 14px;
  color: #696969;
}

.attachment-list {
  padding: 20px;
}

.attachment-empty {
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 14px;
}

.attachment-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.attachment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.attachment-item:last-child {
  border-bottom: none;
}

.attachment-info {
  flex: 1;
}

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

.attachment-name i {
  color: #2196F3;
  font-size: 16px;
}

.attachment-name span {
  font-weight: 500;
  color: #696969;
  font-size: 14px;
}

.attachment-meta {
  font-size: 12px;
  color: #999;
}

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

.btn-download,
.btn-delete {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.btn-download {
  color: #2196F3;
}

.btn-download:hover {
  background: #f0f8ff;
}

.btn-delete {
  color: #f44336;
}

.btn-delete:hover {
  background: #fff5f5;
}

/* Shared Page Attachments */
.shared-attachments {
  background: #fff;
  border: 1px solid #ddd;
  border-top: 0;
  margin-top: 10px;
  border-radius: 0 0 3px 3px;
}

.attachments-header {
  padding: 15px 20px;
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
}

.attachments-header h4 {
  margin: 0;
  font-size: 16px;
  color: #696969;
  display: flex;
  align-items: center;
  gap: 8px;
}

.attachments-list {
  padding: 20px;
}

.attachments-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shared-attachment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.shared-attachment-item:last-child {
  border-bottom: none;
}

.btn-download-shared {
  background: #2196F3;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.3s ease;
}

.btn-download-shared:hover {
  background: #1976D2;
}

/* ========================================
   EXPORT PANEL STYLES
   ======================================== */

.export-panel {
  background: #fff;
  border: 1px solid #ddd;
  border-top: 0;
  margin-top: 10px;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.export-header h4 {
  margin: 0;
  font-size: 16px;
  color: #696969;
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-header .btn-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.export-header .btn-close:hover {
  color: #696969;
}

.export-formats {
  padding: 20px;
}

.export-formats p {
  margin: 0 0 15px 0;
  color: #696969;
  font-size: 14px;
}

.format-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.export-format-btn {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.export-format-btn:hover {
  border-color: #2196F3;
  background: #f8fdff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
}

.export-format-btn i {
  font-size: 24px;
  color: #2196F3;
}

.export-format-btn span {
  font-weight: bold;
  color: #696969;
  font-size: 14px;
}

.export-format-btn small {
  font-size: 11px;
  color: #999;
  line-height: 1.2;
}

/* Disabled export buttons for free/anonymous users */
.disabled-export-btn {
  opacity: 0.6;
  background: #f8f9fa !important;
  border-color: #e9ecef !important;
  cursor: not-allowed !important;
  position: relative;
}

.disabled-export-btn::after { content: none; }

.disabled-export-btn i,
.disabled-export-btn span,
.disabled-export-btn small {
  color: #6c757d !important;
}

.disabled-export-btn:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: #e9ecef !important;
  background: #f8f9fa !important;
}

.export-progress {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.export-info {
  padding: 15px 20px;
  background: #f0f8ff;
  border-top: 1px solid #e0f2ff;
}

.export-info p {
  margin: 0;
  font-size: 12px;
  color: #2196F3;
  display: flex;
  align-items: center;
  gap: 5px;
}

.export-info i {
  font-size: 14px;
}

/* Shared Page Call-to-Action */
.shared-cta {
  margin-top: 20px;
  padding-bottom: 20px;
  text-align: center;
  font-size: 14px;
}

.shared-cta a {
  color: #2196F3;
  text-decoration: none;
  font-weight: bold;
}

.shared-cta a:hover {
  text-decoration: underline;
}

/* ========================================
   SHARED PAGE EXPORT STYLES
   ======================================== */

.shared-export-section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin: 20px 0;
  padding: 20px;
}

.export-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}


.export-notice {
  border-top: 1px solid #f0f0f0;
  padding-top: 15px;
  text-align: center;
}

.export-notice p {
  margin: 0;
  font-size: 12px;
  color: #2196F3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.export-notice a {
  color: #2196F3;
  text-decoration: none;
  font-weight: bold;
}

.export-notice a:hover {
  text-decoration: underline;
}

/* Mobile Responsive */
@media only screen and (max-width: 650px) {
  .attachment-panel {
    margin: 5px 0;
    border-radius: 3px;
  }
  
  .attachment-header,
  .attachment-upload-area,
  .attachment-list {
    padding: 15px;
  }
  
  .upload-zone {
    padding: 30px 15px;
  }
  
  .upload-zone i {
    font-size: 24px;
  }
  
  .upload-zone p {
    font-size: 14px;
  }
  
  .attachment-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .attachment-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .shared-attachment-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  /* Export Panel Mobile */
  .export-panel {
    margin: 5px 0;
    border-radius: 3px;
  }
  
  .export-header,
  .export-formats {
    padding: 15px;
  }
  
  .format-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .export-format-btn {
    padding: 15px 10px;
  }
  
  .export-format-btn i {
    font-size: 20px;
  }
  
  .export-format-btn span {
    font-size: 12px;
  }
  
  .export-format-btn small {
    font-size: 10px;
  }
  
  /* Shared Export Mobile */
  .shared-export-section {
    margin: 10px 0;
    padding: 15px;
  }
  
  .export-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .shared-export-btn {
    padding: 12px 8px;
  }
  
  .shared-export-btn i {
    font-size: 18px;
  }
  
  .shared-export-btn span {
    font-size: 11px;
  }
}

