/**
 * NACL Reports Styles
 * All classes are prefixed with nacl-reports-
 */

/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Container */
.nacl-reports-container {
  max-width: 900px;
  margin: 0px auto;
  padding: 20px;
  font-family: 'Inter', sans-serif;
  background: white;
}

/* Header */
.nacl-reports-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nacl-reports-header h2 {
  margin: 0;
  font-size: 28px;
  color: #333;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

/* Header without filter - center the title */
.nacl-reports-header:not(:has(select)) {
  justify-content: center;
}

/* Fallback for browsers that don't support :has() */
.nacl-reports-header h2:only-child {
  margin: 0 auto;
}

/* Year Filter Select */
.nacl-reports-year-filter {
    width:auto;
  padding: 5px 15px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.nacl-reports-year-filter:hover {
  border-color: #1342a5;
}

.nacl-reports-year-filter:focus {
  outline: none;
  border-color: #1342a5;
  box-shadow: 0 0 0 3px rgba(58, 143, 75, 0.1);
}

/* Grid View */
.nacl-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .nacl-reports-grid {
    grid-template-columns: 1fr;
  }
}

/* Card */
a.nacl-reports-card,
.nacl-reports-card {
  background: linear-gradient(180deg, #FFF7CE 0%, #FFFFFF 100%)!important;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative !important;
  text-decoration: none;
  color: inherit;
}

.nacl-reports-card {
  cursor: pointer;
}

.nacl-reports-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.nacl-reports-card-title {
  font-size: 15px;
  color: #333;
  flex: 1;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
}

.nacl-reports-card-title img.nacl-reports-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nacl-reports-card-title .nacl-reports-title-text {
  flex: 1;
}

.nacl-reports-card-title small {
  display: none;
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

/* Download Button */
.nacl-reports-download {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  min-height: 45px;
  position: absolute;
  top: -25px;
  right: 12px;
}

.nacl-reports-download img {
  width: 40px;
  height: 40px;
  display: block;
}

.nacl-reports-download:hover {
  transform: scale(1.1);
}

.nacl-reports-download:active {
  transform: scale(0.95);
}

/* Load More Button */
.nacl-reports-load-more {
  grid-column: 1 / -1;
  padding: 15px;
  margin-top: 10px;
  background: #3a8f4b;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.nacl-reports-load-more:hover {
  background: #2d7039;
}

/* Year View */
.nacl-reports-year-view {
  margin-top: 20px;
}

.nacl-reports-year-section {
  margin-bottom: 30px;
}

.nacl-reports-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.nacl-reports-card-row .nacl-reports-card {
  flex: 1;
  min-width: 250px;
}

/* Banner */
.nacl-reports-banner {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nacl-reports-banner img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

/* Overlay */
.nacl-reports-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: #3a8f4b;
  padding: 25px 30px;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  font-family: 'Inter', sans-serif;
}

.nacl-reports-overlay h1 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  padding-right: 80px;
  font-family: 'Inter', sans-serif;
}

.nacl-reports-year-display {
  position: absolute;
  right: 20px;
  bottom: 10px;
  font-size: 60px;
  font-weight: bold;
  line-height: 1;
  opacity: 0.9;
  font-family: 'Inter', sans-serif;
}

/* Hidden Class */
.nacl-reports-hidden {
  display: none !important;
}

/* Instructions Section */
.nacl-reports-instructions {
  margin-top: 40px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  border-left: 4px solid #3a8f4b;
  font-family: 'Inter', sans-serif;
}

.nacl-reports-instructions h3 {
  margin-top: 0;
  color: #3a8f4b;
  font-family: 'Inter', sans-serif;
}

.nacl-reports-instructions ul {
  list-style: none;
  padding-left: 0;
}

.nacl-reports-instructions li {
  margin: 10px 0;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 4px;
}

.nacl-reports-instructions code {
  background: #e8f5e9;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
  color: #2d7039;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nacl-reports-container {
    padding: 10px;
  }
  
  .nacl-reports-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .nacl-reports-year-filter {
    width: 100%;
  }
  
  .nacl-reports-card-row {
    flex-direction: column;
  }
  
  .nacl-reports-overlay h1 {
    font-size: 18px;
    padding-right: 60px;
  }
  
  .nacl-reports-year-display {
    font-size: 40px;
    right: 15px;
  }
  
  .nacl-reports-banner img {
    height: 200px;
  }
}

/* Loading State */
.nacl-reports-loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
  font-family: 'Inter', sans-serif;
}

.nacl-reports-loading::after {
  content: '...';
  animation: nacl-reports-dots 1.5s infinite;
}

@keyframes nacl-reports-dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* No Results */
.nacl-reports-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  background: #fff;
  border-radius: 8px;
  color: #666;
  font-size: 16px;
  border: 2px dashed #ddd;
  font-family: 'Inter', sans-serif;
}

/* Fade In Animation */
.nacl-reports-card {
  animation: nacl-reports-fadeIn 0.5s ease;
}

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