/* ========================================
   MOSQUETIME PAGE - MODERN DESIGN
======================================== */

/* Base Layout avec design moderne */
#mosquetime {
  font-family: var(--main-font);
  background: transparent;
  min-height: 100vh;
  padding: var(--spacing-xl) var(--spacing-lg); /* 32px vertical, 24px horizontal - Harmonized with Profile */
  color: var(--primary-color);
  display: flex;
  flex-direction: column;
  margin-left: 0;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Header */
.mosquetime-page-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 1rem 0;
}

.mosquetime-header-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(39, 76, 119, 0.25);
}

.mosquetime-header-icon img {
  width: 40px;
  height: 40px;
  filter: brightness(0) invert(1);
}

.mosquetime-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color, #274c77);
  margin: 0;
  letter-spacing: -0.02em;
  font-family: var(--main-font);
}

.mosquetime-subtitle {
  margin: 0.75rem 0 0;
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 400;
}

/* =============================================================================
   Add Mosque: Flip Animation & Bouncing Button
   ============================================================================= */

/* Flip Container */
.mosquetime-flip-container {
  perspective: 1000px;
  width: 100%;
  position: relative;
  margin-top: 2rem; /* Space for the tab button */
  z-index: 1;
}

/* Elevate z-index when flipped to stay above other page elements */
.mosquetime-flip-container.flipped,
.mosquetime-flip-container.flipped-left {
  z-index: 100;
}

.mosquetime-flip-card {
  position: relative;
  width: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.mosquetime-flip-container.flipped .mosquetime-flip-card {
  transform: rotateY(180deg);
}

.mosquetime-flip-container.flipped .mosquetime-card-front {
  opacity: 0;
  pointer-events: none;
}

.mosquetime-card-front,
.mosquetime-card-back,
.mosquetime-card-back-left {
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: flat;
}

/* Ensure all descendants also hide their backface */
.mosquetime-card-front *,
.mosquetime-card-back *,
.mosquetime-card-back-left * {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mosquetime-card-front {
  position: relative;
  z-index: 2;
  transition: opacity 0.01s 0.4s; /* Fade out at midpoint of 0.8s rotation */
}

/* Reset transition for returning to front */
.mosquetime-flip-container:not(.flipped):not(.flipped-left) .mosquetime-card-front {
  opacity: 1;
  transition: opacity 0.01s 0.4s;
}

.mosquetime-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: rotateY(180deg);
  z-index: 1;
  pointer-events: none;
  visibility: hidden;
}

/* Show back card only when flipped */
.mosquetime-flip-container.flipped .mosquetime-card-back {
  visibility: visible;
}

/* Enable interaction only when flipped to this side */
.mosquetime-flip-container.flipped .mosquetime-card-back {
  pointer-events: auto;
}

/* When flipped, make back card flow in document to expand container height */
.mosquetime-flip-container.flipped .mosquetime-card-back {
  position: relative;
  top: auto;
  left: auto;
}

/* When flipped, hide the front card completely and take it out of flow */
.mosquetime-flip-container.flipped .mosquetime-card-front {
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  overflow: hidden;
}

/* Hide back card when flipped LEFT (showing waiting list) */
.mosquetime-flip-container.flipped-left .mosquetime-card-back {
  opacity: 0;
}

/* Add Mosque Button - Tab Style */
.add-mosque-btn {
  position: absolute;
  top: -1.9rem;
  right: 7%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(135deg, #e88a8a 0%, #d66b6b 100%);
  color: #fff;
  border: none;
  border-radius: 10px 10px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 -4px 15px rgba(214, 107, 107, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

/* Shimmer/reflection effect */
.add-mosque-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 25%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.3) 75%,
    transparent 100%
  );
  animation: tab-shimmer 3s ease-in-out infinite;
}

.add-mosque-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 -6px 20px rgba(214, 107, 107, 0.5);
}

.add-mosque-btn:hover::before {
  animation-play-state: paused;
}

/* No shimmer on back button state */
.mosquetime-flip-container.flipped .add-mosque-btn::before {
  display: none;
}

.add-mosque-btn .add-mosque-icon {
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.add-mosque-btn .add-mosque-text {
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.add-mosque-btn-disabled {
  opacity: 0.7;
  cursor: not-allowed !important;
  pointer-events: none;
}

.add-mosque-btn-disabled::before {
  display: none !important;
}

.add-mosque-btn .add-mosque-soon {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  position: relative;
  z-index: 1;
}

@keyframes tab-shimmer {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

/* Waiting List Button - Tab Style (Left side) - Uses site primary colors */
.waiting-list-btn {
  position: absolute;
  top: -1.9rem;
  left: 2rem;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 -4px 15px rgba(39, 76, 119, 0.3);
  z-index: 10;
  overflow: hidden;
}

.waiting-list-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 -6px 20px rgba(39, 76, 119, 0.5);
}

.waiting-list-btn .waiting-list-icon {
  font-size: 1rem;
  font-weight: bold;
  line-height: 1;
}

.waiting-list-btn .waiting-list-text {
  white-space: nowrap;
}

/* Left Flip Animation (opposite direction) */
.mosquetime-flip-container.flipped-left .mosquetime-flip-card {
  transform: rotateY(-180deg);
}

.mosquetime-flip-container.flipped-left .mosquetime-card-front {
  opacity: 0;
  pointer-events: none;
}

.mosquetime-flip-container.flipped-left .mosquetime-card-back-left {
  pointer-events: auto;
}

/* Back Left Card (Waiting List) */
.mosquetime-card-back-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  backface-visibility: hidden;
  transform: rotateY(-180deg);
  pointer-events: none;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(39, 76, 119, 0.12);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.08);
}

/* Hide back-left card when flipped RIGHT (showing add mosque form) */
.mosquetime-flip-container.flipped .mosquetime-card-back-left {
  opacity: 0;
}

/* Waiting List Card Styles */
.waiting-list-card {
  background: #fff;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
}

.waiting-list-card .mosquetime-header {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  padding: 1.5rem;
}

.waiting-list-card .mosquetime-title {
  color: #fff;
}

.waiting-list-card .mosquetime-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

/* Waiting List Content */
.waiting-list-content {
  padding: 0rem;
  overflow-y: auto;
  max-height: 350px;
}

.waiting-list-loading,
.waiting-list-error,
.waiting-list-empty {
  text-align: center;
  padding: 2rem;
  color: rgba(39, 76, 119, 0.6);
  font-style: italic;
}

.waiting-list-error {
  color: #dc2626;
}

/* Waiting List Columns Layout */
.waiting-list-columns {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.waiting-list-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.waiting-list-column-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 0.75rem;
  margin: 0 0 0.75rem 0;
  border-radius: 8px;
  text-align: center;
}

.waiting-list-column-title.free {
  background: white;
  color: var(--primary-color, #274c77);
  border: 1px solid rgba(39, 76, 119, 0.15);
}

.waiting-list-column-title.priority {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: white;
}

.waiting-list-empty-column {
  text-align: center;
  padding: 1.5rem 1rem;
  color: rgba(39, 76, 119, 0.5);
  font-style: italic;
  font-size: 0.85rem;
  background: rgba(39, 76, 119, 0.03);
  border-radius: 8px;
}

/* Waiting List Items */
.waiting-list-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.waiting-list-item {
  background: rgba(39, 76, 119, 0.04);
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid rgba(39, 76, 119, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.waiting-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.1);
}

.waiting-list-item.priority {
  background: rgba(39, 76, 119, 0.06);
}

.waiting-list-item.free {
  background: white;
}

.waiting-list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.waiting-list-mosque-name {
  font-weight: 600;
  color: var(--primary-color, #274c77);
  font-size: 0.95rem;
}

.waiting-list-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

.waiting-list-badge.paid {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.waiting-list-badge.free {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
}

.waiting-list-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.waiting-list-location {
  font-size: 0.85rem;
  color: rgba(39, 76, 119, 0.7);
}

.waiting-list-contributor {
  font-size: 0.8rem;
  color: rgba(39, 76, 119, 0.6);
  font-style: italic;
}

/* Waiting List Form Actions */
.waiting-list-card .form-actions {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(39, 76, 119, 0.1);
  margin-top: auto;
}

/* Add Mosque Form Card */
.add-mosque-form-card {
  background: #fff;
  min-height: 400px;
}

.add-mosque-form-card .mosquetime-header {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  padding: 1.5rem;
}

.add-mosque-form-card .mosquetime-title {
  color: #fff;
}

/* Form Styles */
.add-mosque-form {
  padding: 0rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.add-mosque-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mosquetime-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.mosquetime-input:focus {
  outline: none;
  border-color: var(--primary-color, #274c77);
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.1);
}

.mosquetime-input::placeholder {
  color: rgba(39, 76, 119, 0.5);
}

.form-help {
  font-size: 0.85rem;
  color: rgba(39, 76, 119, 0.6);
  font-style: italic;
}

/* Contributor Field Styles */
.contributor-group {
  margin-top: 0.5rem;
}

.contributor-input-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.contributor-input-row .mosquetime-input {
  flex: 1;
  min-width: 180px;
}

.contributor-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Toggle Switch Styles */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s ease;
  border-radius: 24px;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.2);
}

.toggle-label {
  font-size: 0.85rem;
  color: rgba(39, 76, 119, 0.8);
  white-space: nowrap;
}

/* Responsive adjustments for contributor field */
@media (max-width: 480px) {
  .contributor-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .contributor-input-row .mosquetime-input {
    width: 100%;
  }

  .contributor-toggle {
    justify-content: flex-start;
    margin-top: 0.5rem;
  }
}

/* ============================================
   Welcome Page - Mosque Submission Form
   Simple, clean design matching screenshot ref
   ============================================ */

/* Form card on welcome page back side */
.mosquetime-card-back .welcome-mosque-form-card {
  padding: 0 !important;
  background: #fff !important;
}

/* Header with gradient - compact */
.mosquetime-card-back .submit-mosque-header {
  padding: 1rem 1.25rem !important;
  margin-bottom: 0 !important;
}

.mosquetime-card-back .submit-mosque-header .mosquetime-title {
  font-size: 1.1rem !important;
  margin-bottom: 0.25rem !important;
}

.mosquetime-card-back .submit-mosque-header .mosquetime-subtitle {
  font-size: 0.78rem !important;
  opacity: 0.9 !important;
}

/* Form container - compact spacing */
.mosquetime-card-back .submit-mosque-form {
  padding: 0.75rem 1rem 1rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  background: #fff !important;
}

/* Form group spacing */
.mosquetime-card-back .submit-mosque-form .form-group {
  margin-bottom: 0 !important;
}

/* Input fields - simple and clean with WHITE background */
.mosquetime-card-back .submit-mosque-input,
.mosquetime-card-back .submit-mosque-form input.submit-mosque-input,
.mosquetime-card-back .submit-mosque-form select.submit-mosque-input {
  width: 100% !important;
  padding: 0.55rem 0.75rem !important;
  border: 1px solid #d0d5dc !important;
  border-radius: 4px !important;
  font-size: 0.85rem !important;
  font-family: inherit !important;
  background-color: #fff !important;
  background: #fff !important;
  color: #333 !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  box-sizing: border-box !important;
}

.mosquetime-card-back .submit-mosque-input:focus {
  outline: none !important;
  border-color: var(--primary-color, #274c77) !important;
  box-shadow: 0 0 0 2px rgba(39, 76, 119, 0.1) !important;
}

.mosquetime-card-back .submit-mosque-input::placeholder {
  color: #999 !important;
  font-size: 0.82rem !important;
}

/* Select dropdown styling */
.mosquetime-card-back .submit-mosque-form select.submit-mosque-input {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  padding-right: 2.5rem !important;
}

/* "Other country" text input shown when "Other" is selected */
.submit-mosque-country-other {
  margin-top: 0.4rem !important;
}

/* Pre-auth confirmation modal (mosque submission) */
.mosque-preauth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.mosque-preauth-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.mosque-preauth-modal-icon {
  color: #22c55e;
  margin-bottom: 1rem;
}

.mosque-preauth-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 0.5rem;
}

.mosque-preauth-modal-message {
  font-size: 0.9rem;
  color: #555;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.mosque-preauth-modal-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 1rem 0;
}

.mosque-preauth-modal-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 0.4rem;
}

.mosque-preauth-modal-submessage {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 1.2rem;
  line-height: 1.4;
}

.mosque-preauth-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mosque-preauth-btn {
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}

.mosque-preauth-btn:active {
  transform: scale(0.98);
}

.mosque-preauth-btn-primary {
  background: var(--primary-color, #274c77);
  color: #fff;
}

.mosque-preauth-btn-primary:hover {
  background: var(--primary-dark, #1b3a5c);
}

.mosque-preauth-btn-secondary {
  background: #f3f4f6;
  color: #333;
}

.mosque-preauth-btn-secondary:hover {
  background: #e5e7eb;
}

/* Help text - subtle and small */
.mosquetime-card-back .submit-mosque-help {
  font-size: 0.72rem !important;
  color: #7a8a99 !important;
  font-style: italic !important;
  margin-top: 0.15rem !important;
  line-height: 1.3 !important;
}

/* Toggle container for contributor display */
.mosquetime-card-back .submit-mosque-form .toggle-container {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin-top: 0.4rem !important;
}

.mosquetime-card-back .submit-mosque-form .toggle-label {
  font-size: 0.78rem !important;
  color: #555 !important;
}

/* Toggle switch smaller */
.mosquetime-card-back .submit-mosque-form .toggle-switch {
  width: 34px !important;
  height: 18px !important;
}

.mosquetime-card-back .submit-mosque-form .toggle-slider::before {
  width: 12px !important;
  height: 12px !important;
}

.mosquetime-card-back .submit-mosque-form input:checked + .toggle-slider::before {
  transform: translateX(16px) !important;
}

/* Contributor help specific */
.mosquetime-card-back .submit-mosque-form .contributor-help {
  margin-top: 0.3rem !important;
}

/* Submit button section */
.mosquetime-card-back .submit-mosque-actions {
  margin-top: 0.5rem !important;
}

.mosquetime-card-back .submit-mosque-btn {
  width: 100% !important;
  padding: 0.6rem 1.25rem !important;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.mosquetime-card-back .submit-mosque-btn:hover:not(:disabled) {
  opacity: 0.95 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.3) !important;
}

.mosquetime-card-back .submit-mosque-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* Priority section in welcome form - compact with background */
.mosquetime-card-back .submit-mosque-form .priority-section {
  background: #f8fafc !important;
  margin: 0.4rem -1rem !important;
  padding: 0.75rem 1rem !important;
  border-top: 1px solid #e8ecf0 !important;
  border-bottom: 1px solid #e8ecf0 !important;
}

.mosquetime-card-back .submit-mosque-form .priority-title {
  font-size: 0.85rem !important;
  margin-bottom: 0.5rem !important;
}

/* Smaller priority cards in welcome form */
.mosquetime-card-back .submit-mosque-form .priority-option {
  padding: 0.6rem !important;
  margin-bottom: 0.4rem !important;
}

.mosquetime-card-back .submit-mosque-form .priority-option-name {
  font-size: 0.8rem !important;
}

.mosquetime-card-back .submit-mosque-form .priority-option-price {
  font-size: 0.9rem !important;
}

.mosquetime-card-back .submit-mosque-form .priority-option-delay {
  font-size: 0.7rem !important;
}

.mosquetime-card-back .submit-mosque-form .pricing-description,
.mosquetime-card-back .submit-mosque-form .pricing-benefits li {
  font-size: 0.7rem !important;
}

.mosquetime-card-back .submit-mosque-form .pricing-benefits {
  gap: 0.2rem !important;
}

.mosquetime-card-back .submit-mosque-form .pricing-duration {
  padding: 0.4rem !important;
  font-size: 0.65rem !important;
}

.mosquetime-card-back .submit-mosque-form .pricing-note {
  font-size: 0.65rem !important;
}

/* Conditions link smaller */
.mosquetime-card-back .submit-mosque-form .conditions-toggle-link {
  font-size: 0.7rem !important;
}

/* Free option styles in welcome form */
.mosquetime-card-back .submit-mosque-form .priority-free-note,
.mosquetime-card-back .submit-mosque-form .priority-free-warning {
  font-size: 0.65rem !important;
  padding: 0.3rem !important;
}

/* Turnstile container spacing */
.mosquetime-card-back .submit-mosque-form .turnstile-container {
  margin: 0.4rem auto 0 !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .mosquetime-card-back .submit-mosque-form {
    padding: 0.6rem 0.85rem 0.85rem !important;
    gap: 0.4rem !important;
  }

  .mosquetime-card-back .submit-mosque-header {
    padding: 0.75rem 0.85rem !important;
  }

  .mosquetime-card-back .submit-mosque-header .mosquetime-title {
    font-size: 1rem !important;
  }

  .mosquetime-card-back .submit-mosque-header .mosquetime-subtitle {
    font-size: 0.72rem !important;
  }

  .mosquetime-card-back .submit-mosque-input {
    padding: 0.5rem 0.65rem !important;
    font-size: 0.8rem !important;
  }

  .mosquetime-card-back .submit-mosque-form .priority-section {
    margin: 0.4rem -0.85rem !important;
    padding: 0.6rem 0.85rem !important;
  }
}

/* Priority Selection Styles */
.priority-section {
  margin: 1rem 0;
}

.priority-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color, #274c77);
  margin: 0 0 0.75rem 0;
}

/* Diagonal shine animation - light and smooth */
@keyframes priority-shine {
  0% {
    transform: translateX(-100%) skewX(-25deg);
  }
  100% {
    transform: translateX(300%) skewX(-25deg);
  }
}

.priority-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid rgba(39, 76, 119, 0.15);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.08);
  overflow: hidden;
}

/* Priority paid card - gradient like header with white text */
.priority-option.priority-paid {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  border-color: rgba(39, 76, 119, 0.4);
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.25);
}

/* White text for paid card */
.priority-option.priority-paid .priority-option-name,
.priority-option.priority-paid .priority-option-price,
.priority-option.priority-paid .priority-option-delay,
.priority-option.priority-paid .pricing-description,
.priority-option.priority-paid .pricing-benefits li,
.priority-option.priority-paid .pricing-duration,
.priority-option.priority-paid .pricing-note {
  color: white !important;
  -webkit-text-fill-color: white !important;
  background: none !important;
}

/* White checkmarks */
.priority-option.priority-paid .pricing-benefits li::before {
  color: rgba(255, 255, 255, 0.9);
}

/* Pricing duration box with subtle white bg */
.priority-option.priority-paid .pricing-duration {
  background: rgba(255, 255, 255, 0.15) !important;
}

/* White radio button */
.priority-option.priority-paid input[type="radio"] {
  accent-color: white;
}

/* Diagonal light shimmer effect - only on paid card */
.priority-option.priority-paid::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 0;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 70%,
    transparent 100%
  );
  animation: priority-shine 6s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* Subtle glass reflection at top */
/* Glass reflection - subtle on free card */
.priority-option.priority-free::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: 10px 10px 0 0;
  pointer-events: none;
}

/* Glass reflection - more subtle on paid gradient card */
.priority-option.priority-paid::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: 10px 10px 0 0;
  pointer-events: none;
}

.priority-option:hover {
  border-color: rgba(39, 76, 119, 0.35);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 25px rgba(39, 76, 119, 0.18);
}

/* Active/pressed state */
.priority-option:active {
  transform: translateY(-1px) scale(0.99);
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.12);
}

.priority-option input[type="radio"] {
  position: relative;
  z-index: 2;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary-color, #274c77);
  cursor: pointer;
}

/* Free card checked state */
.priority-option.priority-free input[type="radio"]:checked ~ .priority-option-content {
  color: var(--primary-color, #274c77);
}

.priority-option.priority-free:has(input[type="radio"]:checked) {
  border-color: var(--primary-color, #274c77);
  background: linear-gradient(145deg, rgba(39, 76, 119, 0.04) 0%, rgba(96, 150, 186, 0.08) 100%);
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Paid card maintains gradient when checked */
.priority-option.priority-paid:has(input[type="radio"]:checked) {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 20px rgba(39, 76, 119, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.priority-option-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.priority-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.priority-option-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary-color, #274c77);
}

.priority-option-price {
  font-weight: 700;
  font-size: 1.15rem;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.priority-option-price.free-price {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.priority-option-delay {
  font-size: 0.85rem;
  color: rgba(39, 76, 119, 0.7);
}

.priority-note {
  display: block;
  font-size: 0.8rem;
  color: rgba(39, 76, 119, 0.6);
  font-style: italic;
  margin-top: 0.25rem;
}

/* Free option notes (inside free card) */
.free-option-notes {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(39, 76, 119, 0.15);
}

.free-note-item {
  font-size: 0.75rem;
  color: rgba(39, 76, 119, 0.6);
  line-height: 1.3;
}

/* Pricing Details Inline (inside paid option card) - always visible */
.pricing-details-inline {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.3);
  display: block;
}

/* Adjust spacing for inline pricing details */
.pricing-details-inline .pricing-description {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.pricing-details-inline .pricing-benefits {
  margin-bottom: 0.5rem;
}

.pricing-details-inline .pricing-benefits li {
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  padding-left: 1.25rem;
}

.pricing-details-inline .pricing-duration {
  font-size: 0.8rem;
  padding: 0.5rem;
  margin-bottom: 0.35rem;
}

.pricing-details-inline .pricing-note {
  font-size: 0.75rem;
}

.pricing-description {
  font-size: 0.9rem;
  color: rgba(39, 76, 119, 0.8);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.pricing-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem 0;
}

.pricing-benefits li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: rgba(39, 76, 119, 0.75);
  line-height: 1.4;
}

.pricing-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary-color, #6096ba);
  font-weight: bold;
}

.pricing-duration {
  font-size: 0.85rem;
  color: rgba(39, 76, 119, 0.7);
  line-height: 1.5;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.pricing-note {
  font-size: 0.8rem;
  color: var(--secondary-color, #6096ba);
  font-style: italic;
  text-align: right;
  margin: 0;
}

/* Conditions link and dropdown */
.conditions-link {
  display: inline-block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: color 0.2s ease;
}

.conditions-link:hover {
  color: white;
}

.conditions-link::after {
  content: ' ▼';
  font-size: 0.6rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

.conditions-link.expanded::after {
  transform: rotate(180deg);
}

.conditions-dropdown {
  display: none;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.conditions-dropdown.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

.conditions-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.conditions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.conditions-list li {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.35rem 0;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.conditions-list li:last-child {
  border-bottom: none;
}

.conditions-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.65rem;
}

/* Turnstile anti-bot verification */
.turnstile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0.75rem;
  background: rgba(39, 76, 119, 0.03);
  border-radius: 10px;
}

.turnstile-status {
  font-size: 0.8rem;
  color: var(--secondary-color, #6096ba);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  align-items: stretch;
}

.form-actions .cancel-btn,
.form-actions .submit-btn {
  flex: 1;
  padding: 0.875rem 1.5rem;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-actions .cancel-btn {
  background: #f3f4f6;
  color: var(--primary-color, #274c77);
  border: 1px solid rgba(39, 76, 119, 0.2);
}

.form-actions .cancel-btn:hover {
  background: #e5e7eb;
}

.form-actions .submit-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: #fff;
  border: none;
}

.form-actions .submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.form-actions .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Message Styles */
.add-mosque-message {
  padding: 1rem;
  margin: 1rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.add-mosque-message.success {
  background: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.add-mosque-message.error {
  background: rgba(244, 67, 54, 0.1);
  color: #c62828;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Responsive adjustments for flip */
@media (max-width: 768px) {
  .mosquetime-flip-container {
    margin-top: 1.75rem;
  }

  .add-mosque-btn {
    top: -1.5rem;
    right: 7%;
    padding: 0.5rem 0.9rem;
    font-size: 0.75rem;
    gap: 0.4rem;
  }

  .add-mosque-btn .add-mosque-icon {
    font-size: 1rem;
  }

  .waiting-list-btn {
    top: -1.5rem;
    left: 1rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.75rem;
    gap: 0.4rem;
  }

  .waiting-list-btn .waiting-list-icon {
    font-size: 1rem;
  }

  .add-mosque-form {
    padding: 1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .waiting-list-content {
    max-height: 350px;
  }

  .waiting-list-columns {
    gap: 0.75rem;
  }

  .waiting-list-column-title {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  .waiting-list-item {
    padding: 0.75rem;
  }

  .waiting-list-mosque-name {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .add-mosque-btn {
    top: -1.3rem;
    right: 7%;
    padding: 0.4rem 0.6rem;
    font-size: 0.65rem;
  }

  .add-mosque-btn .add-mosque-icon {
    font-size: 0.9rem;
  }

  .waiting-list-btn {
    top: -1.3rem;
    left: 0.5rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.65rem;
  }

  .waiting-list-btn .waiting-list-icon {
    font-size: 0.9rem;
  }

  .waiting-list-btn .waiting-list-text {
    display: none;
  }

  .waiting-list-content {
    max-height: 300px;
    padding: 0.75rem;
  }

  .waiting-list-item {
    padding: 0.75rem;
  }

  .waiting-list-mosque-name {
    font-size: 0.85rem;
  }

  .waiting-list-columns {
    flex-direction: column;
    gap: 1rem;
  }

  .waiting-list-column-title {
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.5rem;
  }

  .waiting-list-empty-column {
    padding: 1rem;
    font-size: 0.8rem;
  }
}

/* Container pour limiter la largeur max (comme Profile/AboutUs/etc.) */
.mosquetime-container {
  max-width: 1200px; /* Harmonized with other sections */
  margin: 0 auto;
  width: 100%;
}

/* Main card moderne */
.mosquetime-card {
  width: 100%;
  background: white;
  border: 1px solid rgba(39, 76, 119, 0.12);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.08);
  margin: 0 auto var(--spacing-lg); /* Centered with bottom spacing */
  position: relative;
  transition: box-shadow 0.3s ease;
}

/* Card Title with Gradient */
.mosquetime-card-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: white;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 24px 30px;
  font-family: var(--main-font);
  position: relative;
  text-align: center;
}

/* Effet décoratif sur le header */
.mosquetime-card-title::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -5%;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

/* Content container moderne */
.mosquetime-content {
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
}

/* Modern Input Fields et Controls */
.mosquetime-location-search {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

/* Use Location button - Icon only */
#mosquetime-use-location {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  min-width: 48px;
  height: 48px;
  box-sizing: border-box;
}

#mosquetime-use-location svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Select city - prend l'espace disponible */
.mosquetime-location-search .mosquetime-select {
  flex: 1;
  min-width: 200px;
}

/* Search button */
.mosquetime-location-search #mosquetime-search {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .mosquetime-location-search {
    flex-direction: column;
    gap: 12px;
  }

  #mosquetime-use-location,
  .mosquetime-location-search .mosquetime-select,
  .mosquetime-location-search #mosquetime-search {
    flex: 1 1 auto;
    width: 100%;
    justify-content: center;
  }
}

.mosquetime-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 8px;
  font-size: 15px;
  background: white;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  font-family: var(--main-font);
  height: 48px;
}

.mosquetime-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.08);
}

.mosquetime-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary, #666);
  font-size: 18px;
  line-height: 1.6;
}

/* Modern Buttons */
.mosquetime-button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none;
  font-family: var(--main-font);
  height: 48px;
  box-sizing: border-box;
}

.mosquetime-button:hover {
  background: rgba(39, 76, 119, 0.9);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.2);
}

.mosquetime-button:active {
  background: rgba(39, 76, 119, 0.85);
}

/* Date display moderne */
.mosquetime-date-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(39, 76, 119, 0.2);
}

/* Modern Tabs */
.mosquetime-tabs {
  display: flex;
  margin-bottom: 20px;
  background: rgba(39, 76, 119, 0.05);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.mosquetime-tab {
  flex: 1;
  text-align: center;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 15px;
  font-family: var(--main-font);
}

.mosquetime-tab.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(39, 76, 119, 0.2);
}

/* Modern Mosque Cards */
.mosquetime-mosque-card {
  background: white;
  border: 3px solid rgba(39, 76, 119, 0.25);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(39, 76, 119, 0.18), 0 2px 6px rgba(39, 76, 119, 0.1);
  transition: all 0.3s ease;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.mosquetime-mosque-card:hover {
  box-shadow: 0 12px 32px rgba(39, 76, 119, 0.25), 0 4px 12px rgba(39, 76, 119, 0.15);
  transform: translateY(-4px);
  border-color: var(--primary-color);
  background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

/* Modern Mosque Headers et Info */
.mosque-header {
  display: flex;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(39, 76, 119, 0.1);
  width: 100%;
  gap: 12px;
  align-items: flex-start;
}

/* Styles spécifiques pour All Mosques */
#mosquetime-all-mosques .mosque-header {
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

#mosquetime-all-mosques .mosque-image {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

#mosquetime-all-mosques .mosque-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#mosquetime-all-mosques .mosque-name {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
}

#mosquetime-all-mosques .mosque-address {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
  font-style: italic;
}

/* Styles spécifiques pour Single Mosque */
#mosquetime-single-mosque .mosque-header {
  align-items: flex-start;
}

#mosquetime-single-mosque .mosque-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#mosquetime-single-mosque .mosque-image {
  margin-right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.mosque-image {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  background: var(--gradient-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.mosque-name {
  font-size: 17px;
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px 0;
  font-family: var(--main-font);
}

.mosque-address {
  color: rgba(39, 76, 119, 0.6);
  font-size: 13px;
  margin: 0;
  font-style: italic;
  line-height: 1.5;
  font-family: var(--main-font);
}

/* ========================================
   📍 GEOLOCATION DISTANCE STYLES
   ======================================== */

/* Container for mosque name and distance badge */
.mosque-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mosque-name-row .mosque-name {
  margin: 0;
}

/* Distance badge (circular) */
.distance-badge {
  background: white;
  color: #274c77;
  padding: 2px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(39, 76, 119, 0.3);
  letter-spacing: 0;
  animation: badge-appear 0.3s ease-out;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

@keyframes badge-appear {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loading indicator for geolocation */
.distance-loading {
  color: var(--primary-color);
  font-size: 1.1rem;
  opacity: 0.7;
  display: flex;
  align-items: center;
}

/* Layout container for mosque name/address + actions */
.mosque-info-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.mosque-text-container {
  flex: 1;
  min-width: 0;  /* Permet le text-overflow sur les noms longs */
}

/* Container for distance badge + navigation link (right side of card) */
.mosque-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

/* Action item container (label + icon) */
.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Label above icons */
.action-label {
  font-size: 0.6rem;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Mosque website link icon */
.mosque-website-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  color: #274c77;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(39, 76, 119, 0.3);
}

.mosque-website-link:hover:not(.disabled) {
  background: #f5f5f5;
  color: #1a3a5c;
  transform: scale(1.1);
}

.mosque-website-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.mosque-website-link .website-icon {
  width: 30px;  
  height: 30px;
  object-fit: contain;
}

/* Mosque directions/navigation link */
.mosque-directions-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 50%;
  background: white;
  color: #274c77;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(39, 76, 119, 0.3);
  box-sizing: border-box;
  overflow: hidden;
  padding: 0;
  margin-left: 0;
}

.mosque-directions-link:hover {
  background: #f5f5f5;
  color: #1a3a5c;
  transform: scale(1.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.mosque-directions-link .navigation-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* Distance badge disabled state */
.distance-badge.disabled {
  opacity: 0.4;
  background: #999;
}

/* Distance badge clickable state (welcomepage "see distance") */
.distance-badge.distance-badge-clickable {
  cursor: pointer;
  background: linear-gradient(135deg, #274c77 0%, #1a3a5c 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 10px 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
  /* Override base badge fixed dimensions */
  width: auto;
  height: auto;
  min-width: auto;
  max-width: none;
  min-height: auto;
  max-height: none;
  overflow: visible;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(39, 76, 119, 0.4);
}

/* Expanded action item (no label, larger button) */
.action-item.action-item-expanded {
  justify-content: center;
  align-self: center;
}

.distance-badge.distance-badge-clickable:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.4);
  background: linear-gradient(135deg, #3a6b9a 0%, #274c77 100%);
}

.distance-badge.distance-badge-clickable:focus {
  outline: 2px solid #274c77;
  outline-offset: 2px;
}

.distance-badge.distance-badge-clickable:active {
  transform: scale(0.98);
}

.distance-badge.loading {
  background: rgba(39, 76, 119, 0.3);
}

/* Responsive adjustments for mosque actions */
@media (max-width: 768px) {
  /* Container passe en colonne : texte en haut, actions en bas */
  .mosque-info-container {
    flex-direction: column;
    gap: 10px;
  }

  /* Actions en ligne horizontale, espacées sur toute la largeur */
  .mosque-actions {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    padding: 0 10px;
  }

  /* Chaque action en colonne : label au-dessus, icône en-dessous */
  .action-item {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: auto;
  }

  .action-label {
    font-size: 0.55rem;
  }

  .distance-badge,
  .mosque-website-link,
  .mosque-directions-link {
    min-width: 36px;
    min-height: 36px;
    width: 36px;
    height: 36px;
    max-width: 36px;
    max-height: 36px;
  }

  .distance-badge {
    font-size: 0.7rem;
    padding: 2px;
  }

  .mosque-website-link .website-icon,
  .mosque-directions-link .navigation-icon {
    width: 30px;
    height: 30px;
  }
}

/* Distance detail in address line */
.distance-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 500;
  font-style: normal;
}

.distance-detail i {
  font-size: 0.75rem;
}

/* Geolocation info banner (when permission denied) */
.geolocation-info-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f0fa 100%);
  border: 1px solid rgba(39, 76, 119, 0.15);
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--primary-color);
}

.geolocation-info-banner i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.geolocation-info-banner span {
  flex: 1;
}

.geolocation-enable-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.geolocation-enable-btn:hover {
  background: #3a5a8a;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(39, 76, 119, 0.25);
}

/* Accuracy warning banner (when position is imprecise) */
.accuracy-warning-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid rgba(217, 119, 6, 0.3);
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #92400e;
}

.accuracy-warning-banner i {
  color: #d97706;
  font-size: 1.1rem;
}

.accuracy-warning-banner span {
  flex: 1;
}

/* Responsive adjustments for distance badge */
@media (max-width: 768px) {
  .mosque-name-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .distance-badge {
    font-size: 1rem;
    padding: 2px;
  }

  .distance-loading {
    font-size: 1rem;
  }

  .geolocation-info-banner {
    flex-wrap: wrap;
    padding: 12px;
  }

  .geolocation-enable-btn {
    width: 100%;
    margin-top: 8px;
  }
}

/* ======================================== */

/* Styles de base pour mosque-header - Legacy support removed */

/* Styles spécifiques pour All Mosques */
#mosquetime-all-mosques .mosque-header {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

#mosquetime-all-mosques .mosque-image {
  flex-shrink: 0;
}

#mosquetime-all-mosques .mosque-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#mosquetime-all-mosques .mosque-name {
  margin: 0 0 4px 0;
}

#mosquetime-all-mosques .mosque-address {
  margin: 0;
  font-size: 14px;
  color: #666;
  font-style: italic;
}

/* Styles spécifiques pour Single Mosque */
#mosquetime-single-mosque .mosque-header {
  align-items: flex-start;
}

#mosquetime-single-mosque .mosque-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#mosquetime-single-mosque .mosque-image {
  margin-right: 12px;
}

.mosque-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: var(--background-color);
  flex-shrink: 0;
}

.mosque-name {
  font-size: 18px;
  color: var(--text-color);
  font-weight: 600;
  line-height: 1.2;
}

.mosque-address {
  color: var(--gray-color);
  font-size: 0.875rem;
  margin: 0.5rem 0;
}

.prayer-item {
  text-align: center;
}

.prayer-label {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 4px;
  font-weight: 500;
}

.jamaa-time {
  font-size: 16px;
  color: var(--primary-color);
  font-weight: 600;
}

.mosquetime-error {
  background-color: #fee2e2;
  color: #dc2626;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: none;
}

.mosquetime-disclaimer {
  font-style: italic;
  color: var(--gray-color);
  font-size: 14px;
  margin-top: 20px;
  text-align: center;
}

/* Styles spécifiques pour Single Mosque */
#mosquetime-single-mosque .mosquetime-mosque-card {
  margin-top: 16px;
}

#mosquetime-mosque-select {
  margin-bottom: 16px;
}

.scrollable-content {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 5px; /* Espace pour la barre de défilement */
}

.mosquetime-mosque-card {
  max-height: 400px;
  overflow-y: auto;
}

.mosquetime-tab-content {
  max-height: 600px;
  overflow-y: auto;
}

#welcome-mosquetime-grid {
  max-height: 500px;
  overflow-y: auto;
}

/* Modern Prayer Times Display */
.mosque-prayer-times {
  border-top: 2px solid rgba(39, 76, 119, 0.2);
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.prayer-times-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(39, 76, 119, 0.02);
  border-radius: 8px;
  margin-bottom: 0;
  padding: 8px;
  border: 1px solid rgba(39, 76, 119, 0.08);
  gap: 8px;
  width: 100%;
}

.prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  text-align: center;
  border-radius: 6px;
  background: white;
  transition: all 0.3s ease;
  min-width: 0;
  flex: 1;
}

/* Disposition verticale forcée pour prayer-label et jamaa-time */
.prayer-item .prayer-label,
.prayer-item .jamaa-time {
  display: block;
  width: 100%;
}

.prayer-item:hover {
  background: rgba(39, 76, 119, 0.04);
  transform: translateY(-1px);
}

.prayer-label {
  font-size: 12px;
  color: rgba(39, 76, 119, 0.7);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  font-family: var(--main-font);
}

.jamaa-time {
  font-size: 18px;
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.2;
  font-family: var(--main-font);
}

/* Jumu'ah centrage dans MosqueTime (harmonisation avec WelcomePage) */
#mosquetime .additional-times-grid.has-content {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)) !important;
  justify-items: center !important;
  gap: 8px !important;
  padding: 10px 0 !important;
  opacity: 1 !important;
  background-color: transparent !important;
}

#mosquetime .additional-times-grid.has-content .prayer-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 0.2rem !important;
  text-align: center !important;
  border-radius: 6px;
  min-width: 0;
  flex: 1;
  width: 100%;
}

#mosquetime .additional-times-grid.has-content .prayer-label {
  font-size: 14px !important;
  color: var(--text-color) !important;
  margin-bottom: 4px !important;
  font-weight: 500 !important;
  order: 1;
  display: block !important;
  text-align: center !important;
}

#mosquetime .additional-times-grid.has-content .jamaa-time {
  font-size: 16px !important;
  color: var(--primary-color) !important;
  font-weight: bold !important;
  order: 2;
  margin-top: 2px !important;
  display: block !important;
  text-align: center !important;
}

/* Error states modernes */
.mosquetime-error {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(220, 38, 38, 0.2);
  display: none;
}

/* Disclaimer moderne */
.mosquetime-disclaimer,
.welcomepage-mosque-time .mosquetime-disclaimer {
  text-align: center;
  font-size: 13px;
  color: rgba(39, 76, 119, 0.6);
  margin-top: 24px;
  padding: 14px 16px;
  background: rgba(39, 76, 119, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(39, 76, 119, 0.08);
  font-style: italic;
  font-family: var(--main-font);
  line-height: 1.6;
}

/* =======================================
   MOSQUETIME RESPONSIVE DESIGN MODERNE
   ======================================= */

/* Breakpoint: 1245px - Desktop with Sidebar */
@media (min-width: 1245px) {
  #mosquetime {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }

  .mosquetime-title {
    font-size: 2.2rem;
  }

  .mosquetime-location-search {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

/* Breakpoint: 1024px - Desktop without sidebar - See consolidated media query above */

/* Breakpoint: 1023px - Tablet */
@media (max-width: 1024px) {
  #mosquetime {
    margin-left: 0;
    width: 100%;
    padding: var(--spacing-md); /* 16px - Harmonized with Profile */
  }

  .mosquetime-page-header h1 {
    font-size: 24px;
  }

  .mosquetime-card-title {
    font-size: 16px;
    padding: 14px 16px;
  }
}

/* Rendre les éléments responsifs */
@media (max-width: 768px) {
  .welcomepage-container {
    width: 95vw;
  }

  .mosquetime-sort-buttons {
    margin-bottom: 0.5rem;
  }

  /* Removed .mosquetime-card width/padding - max-width: 800px and default width: 100% handle sizing */

  .welcomepage-mosque-time .mosque-name {
    font-size: 1rem;
    padding: 0.25rem 0.25rem 0 0.25rem;
    margin: 0 0 0.4rem 0.3rem;
  }

  .welcomepage-mosque-time .mosque-address {
    font-size: 0.8rem;
    margin: 0 0 0.25rem 0.3rem;
  }

  #welcome-mosquetime-grid {
    width: 100%;
    padding: 0rem;
  }

  #welcome-mosquetime-grid .mosquetime-mosque-card {
    width: 100%;
    padding: 0.65rem;
    margin: 0.35rem;
  }

  .mosquetime-location-search {
    padding: 0.5rem 0;
  }

  .welcomepage-mosque-time .mosquetime-content {
    padding: 0rem;
  }

  .welcomepage-mosque-time .mosquetime-location-search {
    flex-direction: column;
    gap: 1rem;
  }

  .welcomepage-mosque-time .mosquetime-sort-buttons {
    flex-direction: row; /* Boutons alignés horizontalement */
    justify-content: flex-start; /* Alignement à gauche */
    gap: 0.5rem;
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
  }

  .mosque-prayer-times .prayer-times-grid {
    padding-top: 5px;
  }
}

/* Aligner les styles avec MosqueTime */
.welcomepage-mosque-time .mosque-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.welcomepage-mosque-time .mosque-info {
  flex: 1;
}

.welcomepage-mosque-time .prayer-times-grid,
.welcomepage-mosque-time .additional-times-grid,
.mosquetime-mosque-card .prayer-times-grid,
.mosquetime-mosque-card .additional-times-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: white;
  border-radius: 8px;
  margin-bottom: 0rem;
}

/* Harmoniser les styles entre MosqueTime et WelcomeMosqueTime */

/* Media queries communes pour les deux versions */
@media (max-width: 1200px) {
  /* Removed width: 98% - max-width: 800px handles sizing */
  .welcomepage-mosque-time .mosquetime-card {
    width: 98%;
    margin: 0 auto 1rem auto;
    padding: 0.5rem;
  }

  .prayer-times-grid,
  .additional-times-grid,
  .welcomepage-mosque-time .prayer-times-grid,
  .welcomepage-mosque-time .additional-times-grid {
    gap: 0.1rem; /* Réduire l'espacement pour plus de visibilité */
    padding: 4px 2px;
  }
}

@media (max-width: 768px) {
  .mosquetime-location-search,
  .welcomepage-mosque-time .mosquetime-location-search {
    flex-direction: column;
    gap: 1rem;
  }

  .welcomepage-mosque-time .prayer-item {
    padding: 0.5rem;
    box-shadow: none;
  }

  .prayer-label {
    font-size: 0.9rem;
    display: block !important;
    order: 1 !important;
  }

  .mosquetime-location-search {
    flex-direction: column;
  }

  .welcomepage-mosque-time .mosque-prayer-times .prayer-times-grid,
  .welcomepage-mosque-time .mosque-prayer-times .additional-times-grid {
    padding: 0 0 10px 0;
    margin: 0;
  }

  .jamaa-time {
    font-size: 1rem;
    display: block !important;
    order: 2 !important;
  }

  .mosquetime-title {
    font-size: 19px;
  }

  .mosquetime-subtitle {
    font-size: 12px;
  }

  #mosquetime-city-date {
    font-size: 16px;
  }

  .welcomepage-mosque-time .mosquetime-location-search {
    flex-direction: column;
    gap: 1rem;
  }

  .welcomepage-mosque-time .mosquetime-sort-buttons {
    flex-direction: row; /* Boutons alignés horizontalement */
    justify-content: flex-start; /* Alignement à gauche */
    gap: 0.5rem;
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
  }
}

/* Breakpoint: 480px - Mobile */
@media (max-width: 480px) {
  #mosquetime {
    padding: 8px; /* Harmonized with Profile mobile padding */
  }

  .mosquetime-page-header h1 {
    font-size: 22px;
  }

  .mosquetime-card-title {
    font-size: 15px;
    padding: 12px 14px;
  }

  .mosquetime-content {
    padding: 16px;
  }

  .mosquetime-location-search {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }

  .mosquetime-select,
  .mosquetime-button {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    min-width: 0;
  }

  .mosquetime-select {
    padding-right: 30px; /* Espace pour la flèche native du select */
  }

  .mosquetime-date-display {
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 8px;
  }

  .mosquetime-tabs {
    padding: 4px;
    margin-bottom: 16px;
    border-radius: 6px;
  }

  .mosquetime-tab {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 4px;
  }

  .mosquetime-mosque-card {
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 10px;
  }

  .welcomepage-mosque-time .mosquetime-title {
    font-size: 1.3rem;
  }

  .welcomepage-mosque-time .mosquetime-subtitle {
    font-size: 0.85rem;
  }

  .welcomepage-mosque-time .mosquetime-content {
    padding: 0rem;
  }

  .welcomepage-mosque-time .mosquetime-location-search {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 0;
  }

  .welcomepage-mosque-time .mosquetime-button:hover {
    transform: none;
  }

  .prayer-label {
    font-size: 0.8rem;
    display: block !important;
    order: 1 !important;
  }

  .jamaa-time {
    font-size: 0.9rem;
    display: block !important;
    order: 2 !important;
  }

  .prayer-times-grid,
  .additional-times-grid {
    gap: 0.1rem;
    padding: 2px 1px;
  }

  .prayer-item {
    padding: 0.5rem 0.25rem;
  }

  .mosque-name {
    font-size: 1rem;
  }

  .mosque-prayer-times {
    margin-top: 0.5rem;
  }
}


/* Consolidated responsive - MosqueTime */
@media (min-width: 1024px) and (max-width: 1244px) {
  /* === MOSQUETIME === */
  #mosquetime {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }

  .mosquetime-title {
    font-size: 2rem;
  }
}
