/**
 * Mobile Minimal Shared Styles
 * Gemensamma neutrala stilar för alla kundsidor i mobilvy
 * Baserat på minimalistisk design från customer-dashboard.html
 */

/* ========== MOBILE ONLY ========== */
@media (max-width: 768px) {

  /* Polish 375/414px: inga horisontella scroll – på containern, inte body (för att undvika trasig vertikal touch-scroll på iOS) */
  html, body {
    max-width: 100%;
    /* Förhindrar att Safari triggar pull-to-refresh när användaren skrollar nedåt */
    overscroll-behavior-y: none;
  }
  body {
    overflow-y: auto;
    /* Tydlig momentum-scroll på iOS så att skroll upp fungerar direkt */
    -webkit-overflow-scrolling: touch;
  }

  .page-container,
  .projects-page-container,
  .profile-container {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  /* ========== MINIMAL PILLS/CHIPS ========== */
  
  .minimal-chip,
  .minimal-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .minimal-chip:hover,
  .minimal-pill:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(30, 41, 59, 0.08);
  }
  
  .minimal-chip.active,
  .minimal-pill.active {
    background: #1e293b;
    color: #ffffff;
    border-color: #1e293b;
  }
  
  .minimal-chip i,
  .minimal-pill i {
    color: #6b7280;
  }
  
  .minimal-chip.active i,
  .minimal-pill.active i {
    color: #ffffff;
  }
  
  /* ========== NEUTRAL HEADERS ========== */
  
  .mobile-page-header {
    background: #ffffff;
    border-bottom: 3px solid #1e293b;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(30, 41, 59, 0.06);
  }
  
  .mobile-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
  }
  
  .mobile-page-header .subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
  }
  
  /* ========== MINIMAL CARDS ========== */
  
  .minimal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(30, 41, 59, 0.06);
    transition: all 0.2s ease;
  }
  
  .minimal-card:hover {
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.08);
    border-color: #cbd5e1;
  }
  
  .minimal-card.priority {
    border-left: 3px solid #1e293b;
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.08);
  }
  
  .minimal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
  }
  
  .minimal-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .minimal-card-content {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
  }
  
  /* ========== TOUCH-FRIENDLY ACTIONS ========== */
  
  .touch-action {
    min-height: 44px;
    padding: 0.75rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.938rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
  }
  
  .touch-action-primary {
    background: #1e293b;
    color: #ffffff;
    border: none;
  }
  
  .touch-action-primary:active {
    background: #0f172a;
    transform: scale(0.98);
  }
  
  .touch-action-secondary {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
  }
  
  .touch-action-secondary:active {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: scale(0.98);
  }
  
  .touch-action-outline {
    background: transparent;
    color: #1e293b;
    border: 1px solid #1e293b;
  }
  
  .touch-action-outline:active {
    background: #f8fafc;
    transform: scale(0.98);
  }
  
  /* ========== NEUTRAL FILTERS ========== */
  
  .mobile-filter-dropdown {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.938rem;
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231e293b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
  }
  
  .mobile-filter-dropdown:focus {
    outline: none;
    border-color: #1e293b;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
  }
  
  /* ========== COMPACT STATS ========== */
  
  .mobile-stats-pills {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .mobile-stats-pills::-webkit-scrollbar {
    display: none;
  }
  
  .mobile-stat-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .mobile-stat-pill i {
    font-size: 0.875rem;
    color: #6b7280;
  }
  
  .mobile-stat-pill .value {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.938rem;
  }
  
  .mobile-stat-pill .label {
    font-size: 0.813rem;
    color: #64748b;
  }
  
  /* ========== STICKY FOOTER ACTIONS ========== */
  
  .mobile-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 8px rgba(30, 41, 59, 0.08);
    z-index: 100;
  }
  
  .mobile-sticky-footer-content {
    display: flex;
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .mobile-sticky-footer .touch-action {
    flex: 1;
  }
  
  /* ========== MOBILE TABS ========== */
  
  .mobile-tabs {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .mobile-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .mobile-tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    color: #64748b;
    font-weight: 500;
    font-size: 0.938rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
  }
  
  .mobile-tab:active {
    background: #f8fafc;
  }
  
  .mobile-tab.active {
    color: #1e293b;
    border-bottom-color: #1e293b;
    font-weight: 600;
  }
  
  .mobile-tab-content {
    display: none;
    padding: 1rem;
  }
  
  .mobile-tab-content.active {
    display: block;
  }
  
  /* ========== BADGES ========== */
  
  .mobile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
  }
  
  .mobile-badge-neutral {
    background: #f1f5f9;
    color: #475569;
  }
  
  .mobile-badge-success {
    background: #d1fae5;
    color: #065f46;
  }
  
  .mobile-badge-warning {
    background: #fef3c7;
    color: #92400e;
  }
  
  .mobile-badge-error {
    background: #fee2e2;
    color: #991b1b;
  }
  
  /* ========== ICONS ========== */
  
  .mobile-icon {
    color: #6b7280;
    font-size: 1rem;
  }
  
  .mobile-icon-primary {
    color: #1e293b;
  }
  
  /* ========== SPACING UTILITIES ========== */
  
  .mobile-spacing-compact {
    padding: 0.75rem !important;
  }
  
  .mobile-spacing-normal {
    padding: 1rem !important;
  }
  
  .mobile-spacing-relaxed {
    padding: 1.5rem !important;
  }
  
  .mobile-margin-bottom {
    margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  /* ========== GRAYSCALE OVERRIDES ========== */
  
  /* Override any colorful gradients */
  .mobile-no-gradient {
    background: #ffffff !important;
    background-image: none !important;
  }
  
  /* Override bright colors */
  .mobile-neutral {
    color: #1e293b !important;
  }
  
  /* Override colorful borders */
  .mobile-neutral-border {
    border-color: #e2e8f0 !important;
  }
}
