/* Ramadan Popup Button */
.ramadan-popup-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  margin: 10px;
  animation: pulse 2s infinite;
}

.ramadan-popup-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Popup Modal */
.ramadan-popup {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ramadan-popup-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 3% auto;
  padding: 0;
  width: 90%;
  max-width: 1200px;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes slideIn {
  from {
    transform: translateY(-100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ramadan-popup-header {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px 30px;
  border-radius: 20px 20px 0 0;
  position: relative;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.ramadan-popup-header h2 {
  margin: 0;
  color: white;
  font-size: 28px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.ramadan-popup-header h3 {
  margin: 10px 0 5px;
  color: #ffd700;
  font-size: 22px;
}

.ramadan-popup-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
}

.ramadan-popup-close {
  position: absolute;
  right: 25px;
  top: 15px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.ramadan-popup-close:hover {
  color: #ffd700;
}

/* Calendar Table */
.ramadan-calendar {
  padding: 20px;
}

.ramadan-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  background: white;
  border-radius: 15px;
  overflow: visible;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.ramadan-table thead {
  background: linear-gradient(135deg, #4a90e2 0%, #2c3e50 100%);
  color: white;
}

.ramadan-table th {
  padding: 15px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
}

.ramadan-table tbody tr {
  background: white;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  cursor: pointer;
}

.ramadan-table tbody tr:hover {
  transform: scale(1.01);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  background: #f8f9fa;
}

.ramadan-table td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
}

.ramadan-table td:first-child {
  font-weight: bold;
  color: #2c3e50;
}

.sehri-time {
  color: #27ae60;
  font-weight: bold;
}

.iftar-time {
  color: #e74c3c;
  font-weight: bold;
}

.fasting-duration {
  color: #8e44ad;
  font-style: italic;
}

/* Islamic decoration */
.ramadan-table tbody tr::before {
  /* Decorative pseudo-element removed because absolute positioning caused layout issues
       and interfered with table header rendering. If you want a decoration, re-add
       it with a properly positioned container. */
}

/* Ensure the header looks like a single rounded bar */
.ramadan-table thead th {
  background: linear-gradient(135deg, #4a90e2 0%, #2c3e50 100%);
  color: white;
  position: relative;
  z-index: 2;
}

.ramadan-table thead th:first-child {
  border-top-left-radius: 15px;
}

.ramadan-table thead th:last-child {
  border-top-right-radius: 15px;
}

/* Footer */
.ramadan-popup-footer {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px 30px;
  border-radius: 0 0 20px 20px;
  color: white;
  text-align: center;
}

.ramadan-popup-footer p {
  margin: 5px 0;
}

.ramadan-popup-footer .disclaimer {
  font-size: 12px;
  opacity: 0.8;
}

.no-data {
  text-align: center;
  padding: 50px;
  color: white;
  font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ramadan-popup-content {
    margin: 5% auto;
    width: 95%;
  }

  .ramadan-popup-header h2 {
    font-size: 22px;
  }

  .ramadan-popup-header h3 {
    font-size: 18px;
  }

  .ramadan-table {
    font-size: 14px;
  }

  .ramadan-table th,
  .ramadan-table td {
    padding: 10px 5px;
  }

  .ramadan-popup-btn {
    padding: 12px 20px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .ramadan-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .ramadan-popup-header {
    padding: 15px;
  }

  .ramadan-popup-close {
    right: 15px;
    top: 10px;
    font-size: 30px;
  }
}

/* Print Styles */
@media print {
  .ramadan-popup {
    display: block !important;
    position: relative;
    background: white;
  }

  .ramadan-popup-content {
    margin: 0;
    box-shadow: none;
    background: white;
  }

  .ramadan-popup-btn,
  .ramadan-popup-close {
    display: none;
  }
}
