/* Reset base */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ===========================
   MODALS
=========================== */

/* Fullscreen dark overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99999;

  display: flex;               /* ✅ Flexbox centers content */
  align-items: center;         /* Vertical center */
  justify-content: center;     /* Horizontal center */
}

/* Modal content box */
.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;  /* ✅ close button positioning */
}

/* Close button */
.close-btn, .close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close-btn:hover, .close-btn:focus,
.close-button:hover, .close-button:focus {
  color: black;
}

/* ===========================
   DROPDOWN
=========================== */
/* ===========================
   DROPDOWN (CORRECTED)
=========================== */
.dropdown {
  position: relative; /* Container for absolute positioning */
  display: inline-block;
}

/* ===========================
   DROPDOWN (UPDATED)
=========================== */

/* Base style for the main dropdown menu */
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  background: white;
  border-radius: 0.375rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
  min-width: 160px;
  /* Add this to prevent it from causing horizontal scroll */
  max-width: 100vw;
  box-sizing: border-box;
}

.dropdown-content.show {
  display: block;
}

/* Style for the nested "My Account" submenu */
#my-account-submenu {
  /* Key change: Position statically to force it into the flow */
  position: static;
  box-shadow: none; /* Removes shadow */
  top: auto; /* Resets the absolute top position */
  left: auto; /* Resets the absolute left position */
  border-top: 1px solid #e5e7eb; /* Adds a separator */
  width: 100%; /* Ensures it takes up the full width of its parent */
}

/* Submenu items */
#my-account-submenu a,
#my-account-submenu button {
  padding-left: 1.5rem; /* Add indentation for visual hierarchy */
}
/* ===========================
   PRAYER CARDS
=========================== */
.current-prayer-card {
  border: 2px solid #10B981;
  background-color: #ECFDF5;
}

.prayer-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),
              0 2px 4px -1px rgba(0,0,0,0.06);
  margin-bottom: 1rem;
  transition: transform 0.2s ease-in-out;
  min-width: 100%;
  box-sizing: border-box;
}
.prayer-card:hover {
  transform: translateY(-5px);
}

.prayer-name-section {
  margin-bottom: 0.5rem;
}

.prayer-times-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  text-align: center;
}

.rakat-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .prayer-card {
    flex-direction: row;
    align-items: center;
    padding: 1.5rem;
  }
  .prayer-name-section {
    flex: 0 0 25%;
    margin-right: 1.5rem;
    margin-bottom: 0;
  }
  .prayer-name-section h4 {
    font-size: 1.125rem;
  }
  .prayer-times-grid p.text-xs {
    font-size: 0.75rem;
  }
  .prayer-times-grid p.text-xl {
    font-size: 1.25rem;
  }
}