/* ==========================================================
   MUSCLYTICS – GLOBAL STYLESHEET
   Einheitliche Layout-, Farb- und UI-Basis
   ========================================================== */

:root {
  /* Farben */
  --primary: #007bff;
  --primary-dark: #0056b3;
  --accent: #ffb84d;

  --bg: #f4f4f9;
  --box: #ffffff;

  --text-dark: #333;
  --text-light: #666;

  --footer-height: 70px;
}

/* GLOBAL BOX-SIZING FIX — verhindert zu breite Inputs */
*,
*::before,
*::after {
    box-sizing: border-box;
}


/* ==========================================================
   TYPOGRAFIE
   ========================================================== */

h1 {
  font-size: 1.6em;
  margin: 0 0 10px 0;
  color: var(--text-dark);
}

h2, h3 {
  color: var(--text-dark);
  margin: 15px 0 8px;
}

p {
  color: var(--text-light);
  line-height: 1.4;
}

/* Material Symbols lokal */
@font-face {
  font-family: 'Material Symbols Outlined';
  src: url('/assets/fonts/MaterialSymbolsOutlined.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    display: inline-block;
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
}

/* ============================================================
   GLOBAL CARD SYSTEM – Standardisierte App Cards
   ============================================================ */

.app-card-grid {
    display: grid;
    gap: 18px;
}

/* Mobil */
@media (max-width: 480px) {
    .app-card-grid { grid-template-columns: 1fr; }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 899px) {
    .app-card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop */
@media (min-width: 900px) {
    .app-card-grid { grid-template-columns: repeat(3, 1fr); }
}

.app-card {
    background: var(--box);
    border-radius: 14px;
    border: 1px solid #e5e5e5;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 6px rgba(0,0,0,0.06);
    transition: box-shadow .15s ease, transform .15s ease;
}

.app-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.app-card:hover.no-transform {
  transform: none !important;
}

/* Titel + Info + Actions */
.app-card__title {
    margin: 0 0 12px;
    font-size: 1.15rem;
    font-weight: 600;
}

.app-card__info {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
    color: #555;
    font-size: .95rem;
}

.app-card__info .material-symbols-outlined {
    font-size: 20px;
    color: #555;
}

.app-card__actions {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f3f3f3;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================================
   GLOBAL FORM WIDTH CONTROL – Einheitliche Feldbreiten
   ============================================================ */

.app-card .form-row .form-input,
.app-card .form-row .form-select,
.app-card .form-row .form-textarea {
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
}

.app-card .form-row .form-textarea {
    resize: vertical;
}

/* MAKE CARDS BEHAVE LIKE CARDS, NOT LIKE LINKS */
.app-card,
.app-card:visited,
.app-card * {
    color: inherit !important;
    text-decoration: none !important;
}

.training-row-card {
    display: block;
    padding: 14px 18px;
}

/* Hover nur auf Desktop sichtbar */
@media (hover: hover) {
    .training-row-card:hover .training-row-arrow {
        transform: translateX(4px);
    }
}

/* ============================================================
   EDIT-FORM LAYOUT – nutzt direkt .app-card
   ============================================================ */

.edit-card-content {
    padding-top: 4px;
    padding-bottom: 10px;
}

.edit-card-content .card-title {
    font-size: 1.22rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.edit-card-content .card-subtitle {
    font-size: 0.93rem;
    color: var(--text-light);
    margin-top: -6px;
    margin-bottom: 14px;
}

/* Grid */
.edit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

/* Desktop → 2 Spalten */
@media (min-width: 900px) {
    .edit-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 32px;
    }


    .edit-grid .full {
        grid-column: 1 / -1;
    }
}

/* Label-Optimierung */
.edit-card-content .form-label {
    margin-bottom: 4px;
    font-weight: 600;
}
/* ============================================================
   EDIT PAGES – Globales Layout für alle Bearbeitungsseiten
   ============================================================ */

.edit-page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 12px;
}

.edit-page-wrapper h1 {
    margin-bottom: 22px;
}

.edit-page-wrapper .app-card:first-of-type {
    margin-top: 8px;
}
/* ================================================
   ACTION FOOTER – global für alle Edit-Formulare
   ================================================ */

.action-footer {
    margin-top: 20px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--box);
}

.action-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Buttons gleich hoch */
.action-footer-row .action-btn {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Mobile Version */
@media (max-width: 700px) {

    .action-footer {
        padding: 18px;
    }

    .action-footer-row {
        flex-direction: row; /* gleiche Reihenfolge wie Desktop */
        justify-content: space-between;
        gap: 10px;
    }

    /* Buttons mobil etwas größer */
    .action-footer-row .action-btn {
        flex: 1;
    }

    .action-footer-row .action-btn.primary {
        margin-left: auto;
    }
}

/* ============================================================
   BUTTONS – Einheitliche Styles
   ============================================================ */

button {
    appearance: none;
    background: none;
    box-shadow: none !important;
}

.action-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #f4f6f9;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: #444;

    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.action-btn .material-symbols-outlined {
    font-size: 20px;
}

.action-btn.icon {
    width: 36px;
    padding: 0;
}

/* Hover */
.action-btn:hover {
    background: #eef3ff;
    border-color: #cddfff;
    transform: translateY(-1px);
}

/* Active */
.action-btn:active { transform: translateY(0); }

/* Variants */
.action-btn.primary {
    background: #e6efff;
    border-color: #b7c9f5;
    color: #1e5ab6;
    font-weight: 600;
}
.action-btn.primary:hover {
    background: #dce9ff;
    border-color: #a9c1f3;
}

.action-btn.secondary {
    background: #f1f1f1;
    border-color: #d4d4d4;
    color: #444;
}
.action-btn.secondary:hover {
    background: #e8e8e8;
    border-color: #c7c7c7;
}

.action-btn.delete {
    background: #fff5f5;
    border-color: #f1c0c0;
    color: #b00020;
}
.action-btn.delete:hover {
    background: #ffe8e8;
    border-color: #e09b9b;
}

.action-btn.ghost {
    background: transparent;
    border: 1px solid transparent;
    color: #666;
}
.action-btn.ghost:hover {
    background: #f0f0f0;
    border-color: #ddd;
}

/* ============================================================
   FLOATING ACTION BUTTON (FAB)
   ============================================================ */

.fab-add-button {
    position: fixed;
    bottom: calc(24px + (var(--footer-present, 0) * var(--footer-height)));
    right: calc((100vw - 1200px) / 2 + 24px);

    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #f5f8ff;
    border: 1px solid #c8d5f3;
    color: #1e5ab6;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    text-decoration: none;
    transition: background .25s, border-color .25s, transform .25s, opacity .25s;
    z-index: 9999;
}

.fab-add-button.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.fab-add-button:hover {
    background: #e7efff;
    border-color: #b2c7ef;
    transform: translateY(-3px) scale(1.03);
}

.fab-add-button .material-symbols-outlined {
    font-size: 30px;
}

@media (max-width: 600px) {
    .fab-add-button {
        bottom: calc(20px + (var(--footer-present, 0) * var(--footer-height)));
        right: 20px;
    }
}

/* ============================================================
   FORMULAR-GRUNDELEMENTE
   ============================================================ */

.form-grid {
    display: grid;
    gap: 20px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
}

.form-label {
    font-weight: 600;
    font-size: 15px;
}

.form-input,
.form-textarea,
.form-select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 15px;
    width: 100%;
}

/* Help text */
.form-help {
    font-size: 13px;
    color: #888;
}

/* ============================================================
   GLOBAL SEARCH / FILTER BAR
   ============================================================ */

.search-wrapper {
    display: none;
    margin-bottom: 14px;
}

.search-container {
    width: 100%;
    position: relative;
}

.search-container .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: #777;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 46px;
    border-radius: 14px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background: var(--box);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
/* ============================================
   SEARCH FIELD — volle Breite erlauben
   ============================================ */
.search-container .search-input {
    max-width: none !important;
    width: 100% !important;
}

.grid-search-wrapper {
    grid-column: 1 / -1;
}

/* ============================================================
   DESKTOP HEADER
   ============================================================ */

.desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.desktop-header h1 {
    margin: 0;
    font-size: 1.6rem;
}

.header-icon-btn {
    background: none !important;
    border: none !important;
    padding: 6px;
}

.header-icon-btn .material-symbols-outlined {
    font-size: 24px;
    color: var(--text-dark);
    transition: color .15s ease;
}

.header-icon-btn.active .material-symbols-outlined {
    color: var(--primary);
}

/* ============================================================
   SETTINGS OPTIMIERTES LAYOUT
============================================================ */

.settings-wrapper {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Tabs */
.settings-tabs {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
}

.settings-tab {
    padding: 10px 20px;
    font-size: 15px;
    border-radius: 12px;
    background: #e8edf7;
    color: #444;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.settings-tab:hover {
    background: #d7e1ff;
}

.settings-tab.active {
    background: #c6d6ff;
    color: #1f3fae;
}

/* Hauptkarte */
.settings-card {
    padding: 28px 30px 32px;
    margin-bottom: 6px;
}

/* Section Abstände */
.settings-card .section-title {
    font-size: 1rem;
    margin: 26px 0 8px;
    font-weight: 600;
}

/* Checkboxen */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}


.temp-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.75rem;
  background: rgba(255,193,7,0.18);
}

.form-input,
.form-select {
    background-color: #fff !important;
    border: 1px solid #ddd !important;
}

.form-input:disabled,
.form-select:disabled,
.form-input.is-locked,
.form-select.is-locked,
.form-select option:disabled
 {
    background-color: #f1f3f5 !important;
    color: #999 !important;
    cursor: not-allowed;
}

select option:disabled {
    color: var(--text-light, #999) !important;
    background-color: #f5f5f5 !important;
    font-style: italic !important;
    cursor: not-allowed;
    opacity: .7;
}










/* ============================================================
   MOBILE VISIBILITY
   ============================================================ */

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hide-mobile { display: flex !important; }
}

