/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Custom Font Classes */
.font-sofia-sans {
  font-family: 'Sofia Sans', sans-serif;
}

.font-petrona {
  font-family: 'Petrona', serif;
}

/* Weight Slider Styles */
.slider::-webkit-slider-thumb {
  appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #000000;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #000000;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Training Text Styles */
.training-text-container {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.training-text-container p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Notice Tooltip Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Mobile Modal Styles */
@media (max-width: 767px) {
  /* Base mobile modal styles - auto height by default for regular modals */
  .modal-mobile-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    /* Auto height by default - no fixed height */
  }

  /* Full height variant for specific modals like training history */
  .modal-mobile-fullheight {
    bottom: 0 !important;
    height: 100vh !important;
    max-height: none !important;
  }

  /* Prevent body scroll on mobile when modal is open */
  body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
  }

  /* Safe area handling for mobile devices */
  .modal-content-mobile {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* Modal animations */
@keyframes modalSlideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes modalSlideOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.modal-slide-in {
  animation: modalSlideIn 0.3s ease-out;
}

.modal-slide-out {
  animation: modalSlideOut 0.3s ease-out;
}

.mobile-menu-panel {
  z-index: 50;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Mobile Navigation Spacing */
@media (max-width: 767px) {
  body.has-mobile-nav main > div {
    padding-bottom: 4rem; /* 64px space for mobile navigation */
  }
}

@media (min-width: 768px) {
  body.has-mobile-nav main > div {
    padding-bottom: 0; /* No padding on desktop */
  }
}

/* Mobile Tab Styles */
.mobile-tab-button {
  position: relative;
  transition: all 0.2s ease;
}

.mobile-tab-button.mobile-tab-active {
  position: relative;
  z-index: 10;
}

.mobile-tab-button.mobile-tab-active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background-color: #000000;
  border-radius: 2px 2px 0 0;
  z-index: 15;
}

.mobile-tab-button.mobile-tab-active::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background-color: white;
  z-index: 12;
}

/* Mobile Drawer Styles */
.drawer-overlay {
  backdrop-filter: blur(3px);
}

.drawer-menu {
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

/* Prevent body scroll when drawer is open */
body.drawer-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
}

/* Safe area handling for drawer on mobile */
@media (max-width: 767px) {
  .drawer-menu {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .drawer-menu:focus-within {
    outline: none;
  }
}