/**
 * SnowBounty Universal Bounty Details Modal
 * Include this CSS on any page that needs bounty details viewing
 */

/* ============ Bounty Details Modal Overlay ============ */
.sb-bounty-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  padding: 20px;
}

.sb-bounty-detail-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============ Modal Container ============ */
.sb-bounty-detail-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.2s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.sb-bounty-detail-overlay.active .sb-bounty-detail-modal {
  transform: scale(1) translateY(0);
}

/* ============ Modal Header ============ */
.sb-bounty-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  flex-shrink: 0;
}

.sb-bounty-detail-header-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.sb-bounty-detail-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.sb-bounty-detail-close:hover {
  background: #eee;
  color: #333;
}

/* ============ Modal Body ============ */
.sb-bounty-detail-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* Photo */
.sb-bounty-detail-photo {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.sb-bounty-detail-photo:hover {
  opacity: 0.9;
}

/* Badges row */
.sb-bounty-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.sb-bounty-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sb-bounty-detail-badge.status-open {
  background: #e8f5e9;
  color: #2e7d32;
}

.sb-bounty-detail-badge.status-accepted {
  background: #fff3e0;
  color: #e65100;
}

.sb-bounty-detail-badge.status-completed {
  background: #e8eaf6;
  color: #3f51b5;
}

.sb-bounty-detail-badge.payment {
  background: #e8f5e9;
  color: #2e7d32;
}

.sb-bounty-detail-badge.volunteer {
  background: #e8eaf6;
  color: #5c6bc0;
}

.sb-bounty-detail-badge.category {
  background: #f3e5f5;
  color: #7b1fa2;
}

.sb-bounty-detail-badge.frequency {
  background: #e3f2fd;
  color: #1565c0;
}

/* Title */
.sb-bounty-detail-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
  line-height: 1.3;
}

/* Info sections */
.sb-bounty-detail-section {
  margin-bottom: 18px;
}

.sb-bounty-detail-section-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.sb-bounty-detail-section-content {
  font-size: 15px;
  color: #333;
  line-height: 1.6;
}

/* Meta row (side by side items) */
.sb-bounty-detail-meta-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.sb-bounty-detail-meta-row .sb-bounty-detail-section {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
}

/* Location with icon */
.sb-bounty-detail-location {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.sb-bounty-detail-location svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #5c6bc0;
}

/* Description */
.sb-bounty-detail-description {
  background: #f8f9fa;
  padding: 14px;
  border-radius: 8px;
  border-left: 3px solid #5c6bc0;
}

/* Poster info */
.sb-bounty-detail-poster {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.sb-bounty-detail-poster-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.sb-bounty-detail-poster-info {
  flex: 1;
}

.sb-bounty-detail-poster-name {
  font-weight: 600;
  color: #333;
}

.sb-bounty-detail-poster-label {
  font-size: 12px;
  color: #888;
}

/* Map container */
.sb-bounty-detail-map {
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
  height: 200px;
  background: #f0f0f0;
}

.sb-bounty-detail-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============ Modal Footer ============ */
.sb-bounty-detail-footer {
  padding: 16px 20px;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.sb-bounty-detail-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #ddd;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sb-bounty-detail-btn:hover {
  background: #f0f0f0;
}

.sb-bounty-detail-btn-primary {
  background: #5c6bc0;
  color: #fff;
  border-color: #5c6bc0;
}

.sb-bounty-detail-btn-primary:hover {
  background: #7986cb;
  border-color: #7986cb;
}

.sb-bounty-detail-btn-accept {
  background: #00d4aa;
  color: #000;
  border-color: #00d4aa;
  font-weight: 600;
}

.sb-bounty-detail-btn-accept:hover {
  background: #00f5c4;
  border-color: #00f5c4;
}

/* ============ Loading State ============ */
.sb-bounty-detail-loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.sb-bounty-detail-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #5c6bc0;
  border-radius: 50%;
  animation: sb-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes sb-spin {
  to { transform: rotate(360deg); }
}

/* ============ Error State ============ */
.sb-bounty-detail-error {
  text-align: center;
  padding: 40px 20px;
  color: #e74c3c;
}

/* ============ Responsive ============ */
@media (max-width: 600px) {
  .sb-bounty-detail-overlay {
    padding: 10px;
  }
  
  .sb-bounty-detail-modal {
    max-height: 95vh;
  }
  
  .sb-bounty-detail-body {
    padding: 16px;
  }
  
  .sb-bounty-detail-title {
    font-size: 18px;
  }
  
  .sb-bounty-detail-meta-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .sb-bounty-detail-footer {
    flex-wrap: wrap;
  }
  
  .sb-bounty-detail-btn {
    flex: 1;
    justify-content: center;
    min-width: 100px;
  }
}
