/* Download Links Component - Dark Theme */

/* Enhanced positioning wrappers */
.nandung-membership-links-wrapper {
  margin: 20px 0;
  padding: 0;
  border-top: 2px solid var(--nandung-download-button-bg, #3b82f6);
  border-bottom: 1px solid var(--nandung-download-border, #444444);
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.nandung-membership-links-secondary {
  margin: 25px 0;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #3b82f6;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15);
}

.nandung-membership-links-secondary h4 {
  margin: 0 0 15px 0 !important;
  color: #2563eb !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nandung-membership-links-secondary h4:before {
  content: "🔑";
  font-size: 20px;
}

.nandung-download-tab-content {
  padding: 20px 0;
}

/* Override dark theme for secondary wrapper to use light theme */
.nandung-membership-links-secondary .nandung-download-links {
  background: #ffffff;
  border: 1px solid #e9ecef;
  color: #333333;
}

.nandung-membership-links-secondary .nandung-download-header h3 {
  color: #333333;
}

.nandung-membership-links-secondary .nandung-download-item {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
}

.nandung-membership-links-secondary .nandung-download-item:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.nandung-membership-links-secondary .nandung-download-name {
  color: #333333;
}

.nandung-membership-links-secondary .nandung-download-size {
  color: #6c757d;
}

:root {
  --nandung-download-bg: #1a1a1a;
  --nandung-download-card: #333333;
  --nandung-download-text: #ffffff;
  --nandung-download-text-secondary: #cccccc;
  --nandung-download-border: #444444;
  --nandung-download-hover: #555555;
  --nandung-download-button-bg: #3b82f6;
  --nandung-download-button-hover: #2563eb;
  --nandung-download-spacing: 20px;
  --nandung-download-border-radius: 8px;
  --nandung-download-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --nandung-download-item-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Main download links container */
.nandung-download-links {
  background: var(--nandung-download-bg);
  border: 1px solid var(--nandung-download-border);
  border-radius: var(--nandung-download-border-radius);
  padding: var(--nandung-download-spacing);
  margin: var(--nandung-download-spacing) 0;
  box-shadow: var(--nandung-download-shadow);
  color: var(--nandung-download-text);
}

/* Download header */
.nandung-download-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nandung-download-border);
}

.nandung-download-header h3 {
  margin: 0;
  color: var(--nandung-download-text);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Download list */
.nandung-download-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Individual download items */
.nandung-download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--nandung-download-card);
  border: 1px solid var(--nandung-download-border);
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: var(--nandung-download-item-shadow);
}

.nandung-download-item:hover {
  background: var(--nandung-download-hover);
  border-color: #666666;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Download info section */
.nandung-download-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0; /* Allow text truncation */
}

.nandung-download-icon {
  font-size: 20px;
  flex-shrink: 0;
  display: inline-block;
  width: 24px;
  text-align: center;
}

.nandung-download-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0; /* Allow text truncation */
}

.nandung-download-name {
  font-weight: 500;
  color: var(--nandung-download-text);
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nandung-download-size {
  font-size: 12px;
  color: var(--nandung-download-text-secondary);
  font-weight: 400;
}

/* Download actions */
.nandung-download-actions {
  flex-shrink: 0;
  margin-left: 12px;
}

.nandung-download-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--nandung-download-button-bg);
  color: white !important;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.nandung-download-button:hover {
  background: var(--nandung-download-button-hover);
  color: white !important;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.nandung-download-button:focus {
  outline: 2px solid var(--nandung-download-button-bg);
  outline-offset: 2px;
}

.nandung-download-button-text {
  font-size: 13px;
}

.nandung-download-button-icon {
  font-size: 14px;
}

/* Download footer */
.nandung-download-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--nandung-download-border);
}

.nandung-download-note {
  margin: 0;
  font-size: 12px;
  color: var(--nandung-download-text-secondary);
  font-style: italic;
  text-align: center;
}

/* Access denied styling */
.nandung-access-denied {
  text-align: center;
}

.nandung-access-message {
  padding: 20px;
  background: var(--nandung-download-card);
  border-radius: 6px;
  border: 1px solid var(--nandung-download-border);
}

.nandung-access-message p {
  margin: 0;
  color: var(--nandung-download-text-secondary);
  font-size: 14px;
}

/* Mobile-first responsive design */
@media (max-width: 767px) {
  .nandung-download-links {
    padding: 16px;
    margin: 16px 0;
  }

  .nandung-download-header h3 {
    font-size: 16px;
  }

  .nandung-download-item {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 12px;
  }

  .nandung-download-info {
    justify-content: flex-start;
    gap: 10px;
  }

  .nandung-download-details {
    flex: 1;
  }

  .nandung-download-name {
    font-size: 13px;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  .nandung-download-actions {
    margin-left: 0;
    align-self: stretch;
  }

  .nandung-download-button {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 14px;
  }

  .nandung-download-icon {
    font-size: 18px;
    width: 20px;
  }
}

/* Tablet and desktop */
@media (min-width: 768px) {
  .nandung-download-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .nandung-download-info {
    flex: 1;
    min-width: 0;
  }

  .nandung-download-actions {
    margin-left: 12px;
  }

  .nandung-download-button {
    width: auto;
  }
}

/* Large screens - enhanced spacing */
@media (min-width: 1200px) {
  .nandung-download-links {
    padding: 24px;
  }

  .nandung-download-header h3 {
    font-size: 20px;
  }

  .nandung-download-item {
    padding: 16px;
  }

  .nandung-download-name {
    font-size: 15px;
  }

  .nandung-download-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
  .nandung-download-item,
  .nandung-download-button {
    transition: none;
  }
  
  .nandung-download-item:hover,
  .nandung-download-button:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nandung-download-links,
  .nandung-download-item {
    border: 2px solid var(--nandung-download-text);
    background: #000000;
  }

  .nandung-download-text,
  .nandung-download-name {
    color: #ffffff;
  }

  .nandung-download-button {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
  }

  .nandung-download-button:hover {
    background: #cccccc;
    color: #000000;
  }
}

/* Print styles */
@media print {
  .nandung-download-links {
    background: white !important;
    color: black !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }

  .nandung-download-item {
    background: #f9f9f9 !important;
    color: black !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }

  .nandung-download-name,
  .nandung-download-text {
    color: black !important;
  }

  .nandung-download-button {
    background: #f0f0f0 !important;
    color: black !important;
    border: 1px solid #ccc !important;
  }
}