/**
 * Premier Line Gym Backend - Public Styles
 *
 * @package PremierLineGym
 * @since 1.0.0
 */

/* Workout Display */
.plg-workout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.plg-workout-header {
  margin-bottom: 30px;
}

.plg-workout-header h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.plg-workout-day {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.plg-workout-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.plg-workout-day-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.plg-muscle-groups {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.plg-muscle-group-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f0f0;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
}

/* Exercise Card */
.plg-exercise-card {
  display: flex;
  gap: 20px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 6px;
  margin-bottom: 15px;
}

.plg-exercise-image {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
}

.plg-exercise-content {
  flex: 1;
}

.plg-exercise-name {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
}

.plg-exercise-params {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #666;
}

.plg-exercise-param {
  display: flex;
  align-items: center;
  gap: 5px;
}

.plg-exercise-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.plg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: #fd8383;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.plg-btn:hover {
  background: #fc6565;
  color: #fff;
}

.plg-btn.secondary {
  background: #f0f0f0;
  color: #333;
}

.plg-btn.secondary:hover {
  background: #e0e0e0;
  color: #333;
}

.plg-btn.success {
  background: #00a32a;
}

.plg-btn.success:hover {
  background: #008a20;
}

/* Progress Chart */
.plg-progress-chart {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.plg-chart-header {
  margin-bottom: 20px;
}

.plg-chart-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.plg-chart-canvas {
  max-width: 100%;
  height: 300px;
}

/* Modal */
.plg-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.plg-modal.active {
  display: flex;
}

.plg-modal-content {
  background: #fff;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  position: relative;
}

.plg-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.plg-modal-title {
  margin: 0;
  font-size: 20px;
}

.plg-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.plg-modal-body {
  padding: 20px;
}

.plg-modal-footer {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  text-align: right;
}

/* Loading */
.plg-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.plg-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #fd8383;
  border-radius: 50%;
  animation: plg-spin 1s linear infinite;
}

@keyframes plg-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .plg-workout-container {
    padding: 10px;
  }

  .plg-exercise-card {
    flex-direction: column;
  }

  .plg-exercise-params {
    flex-wrap: wrap;
  }

  .plg-exercise-actions {
    flex-direction: column;
  }

  .plg-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Fixed Footer Navigation (Elementor Theme Builder footer - Template 364)
   NOTE: Footer positioning CSS moved to inline styles in Plugin.php
   to avoid WKWebView cache issues on first load.
   NOTE: In Elementor editor (Template 364), the mobile footer section should
   have visibility set to "Hide on Desktop" only (NOT "Hide on Desktop + Tablet")
   so the icon bar is visible on iPad in the browser.
   ========================================================================== */

/* Prevent long-press context menu / share sheet on footer icons (mobile) */
.elementor-location-footer {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.elementor-location-footer img,
.elementor-location-footer a,
.elementor-location-footer svg {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
.elementor-location-footer [data-id] {
  touch-action: manipulation;
}

/* iPad / Tablet: force footer icons to lay out horizontally.
   Elementor Flexbox containers default to flex-direction: column;
   this override ensures the footer nav stays in a row on tablet viewports. */
@media (min-width: 768px) and (max-width: 1024px) {
  .elementor-location-footer .e-con.e-parent > .e-con-inner {
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;
  }
  .elementor-location-footer .e-con-full.e-flex.e-child {
    flex: 1;
    justify-content: center;
    align-items: center;
  }
}

/* ==========================================================================
   Elementor Fixes
   ========================================================================== */

/**
 * Fix margin-top issue on mobile for element d5f026e
 * Override Elementor's 271px margin-top
 */
@media (max-width: 1600px) {
  .elementor-364 .elementor-element.elementor-element-d5f026e {
    --margin-top: 0px !important;
    margin-top: 0 !important;
  }
}

#pms_login label {
  color: #fff !important;
}

/* ==========================================================================
   Tablet: Mobile-only pages viewport override support
   On tablets, an inline <script> in <head> sets viewport width=430,
   which forces Elementor to use its mobile breakpoint CSS automatically.
   Content fills the screen (scaled proportionally). Fullwidth layout.
   ========================================================================== */
body.plg-mobile-page {
  overflow-x: hidden;
}
body.plg-mobile-page #page,
body.plg-mobile-page #content {
  padding: 0 !important;
  max-width: 100% !important;
}
