/******************************************************************************
 * FormR Custom CSS - Optimiert für alle Bildschirmgrößen
 * Letzte Aktualisierung: Februar 2026
 * Unterstützt: Mobile (320px+), Tablets, iPad (alle Modelle), Desktop
 ******************************************************************************/

/******************************************************************************
 * ALLGEMEINE LAYOUT-ANPASSUNGEN
 ******************************************************************************/

/* Entfernt unteren Abstand */
.space_bottom_zero {
    padding-bottom: 0px;
}

/* Entfernt oberen und unteren Abstand */
.space_bottom_top_zero {
    margin-top: 0px;
    margin-bottom: 0px;
}

/******************************************************************************
 * BLOCK ITEMS - Hintergrund-Anpassungen
 ******************************************************************************/

/* Entfernt roten Hintergrund und Rahmen von required block items */
div.form-group.form-row.alert.alert-danger.required.block_without_background {
    border-style: none !important;
    background-color: white !important;
}

/******************************************************************************
 * POSITIONIERUNGS-HELFER
 * Für spezielle Items (z.B. sincewhen items in Gesundheitsfragebogen)
 ******************************************************************************/

.righter225 {
    position: relative;
    left: 225px;
}

.righter75 {
    position: relative;
    left: 75px;
}

.righter50 {
    position: relative;
    left: 50px;
}

.righter30 {
    position: relative;
    left: 30px;
}

.righter20 {
    position: relative;
    left: 20px;
}

.righter10 {
    position: relative;
    left: 10px;
}

/******************************************************************************
 * HEADER IMAGE
 ******************************************************************************/

/* Reduziert Header-Bild auf 30% der Originalgröße, rechtsbündig */
.run-container .run_content_header img {
    max-width: 30%;
    height: auto;
    float: right;
}

/******************************************************************************
 * PROGRESS BAR
 ******************************************************************************/

/* Versteckt den Fortschrittsbalken standardmäßig */
.progress-container {
    display: none;
}

/******************************************************************************
 * RATING BUTTONS / SLIDER - HAUPTFORMATIERUNG
 ******************************************************************************/

/*** (1) GRÖßE UND BREITE ***/

/* Button-Gruppe auf volle Breite */
form.form-horizontal div.form-row.form-group.item-rating_button .btn-group {
    margin-top: 0px;
    width: 100%;
}

/* Größe und Stil der einzelnen Rating-Buttons/Slider-Segmente */
.analogue_rating_scale .btn-group > .btn {
    border-width: 0;
    height: 15px;
    width: 10px;
    overflow: visible;
    background-color: #ddd;
    padding: 3% 3% 3% 3%;
    margin: 0px;
}

/*** (2) POSITION UND ZENTRIERUNG ***/

/* Zentriert den Slider horizontal */
form.form-horizontal div.form-row.form-group.item-rating_button .btn-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Schiebt den Slider über die Text-Labels (wichtig für Layout) */
form.form-horizontal div.form-row.form-group.item-rating_button .btn-group {
    margin-top: -50px;
}

/* Erhöht Abstand zwischen einzelnen Antwort-Items */
form.form-horizontal div.answer_below_label .control-label {
    margin-bottom: 40px !important;
}

/* Sorgt für korrekte Ausrichtung aller Buttons */
div.form-row.form-group .btn-group>.btn-group+.btn,
div.form-row.form-group:not(.mc_horizontal) .btn-group>.btn+.btn,
div.form-row.form-group:not(.mc_horizontal) .btn-group>.btn+.btn-group,
div.form-row.form-group:not(.mc_horizontal) .btn-group>.btn-group+.btn-group {
    margin-top: 0px;
}


/* Anpassungen für ersten Button auf kleinen Screens */
div.form-row.form-group:not(.mc_horizontal) .btn-group>.btn:first-child:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 2px;
}

/* Entfernt Standard-Rundungen bei letztem Button */
.btn-group .btn-group>.btn:last-child:not(:first-child) {
    /* border-radius: 0; */
}

/* Anpassungen für letzten Button auf kleinen Screens */
div.form-row.form-group:not(.mc_horizontal) .btn-group>.btn:last-child:not(:first-child) {
    border-top-right-radius: 2px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/*** (3) LABELS (Links/Rechts Beschriftungen am Slider) ***/

/* Grundeinstellungen für Slider-Labels */
form.form-horizontal div.form-group.item-rating_button div.controls .controls-inner label.keep-label {
    position: absolute;
}

/* Linkes Label - linksbündig positioniert */
form.form-horizontal div.form-group.item-rating_button div.controls .controls-inner label.keep-label:first-of-type {
    text-align: left;
    left: 0;
    top: 0;
}

/* Rechtes Label - rechtsbündig positioniert */
form.form-horizontal div.form-group.item-rating_button div.controls .controls-inner label.keep-label:last-of-type {
    text-align: right;
    right: 0;
    top: 0;
}

/* Zeilenabstand der Slider-Labels */
form.form-horizontal div.item-rating_button div.controls label.keep-label {
    line-height: 1.3;
}

/******************************************************************************
 * SCHRIFTGRÖSSEN - Desktop/Standard
 ******************************************************************************/

/* Schriftgröße für Rating Button Items (Fragen) */
form.form-horizontal div.form-group.item-rating_button div.control-label {
    font-size: 110%;
}

/* Schriftgröße für Multiple Choice Button Items */
form.form-horizontal div.form-group.item-mc_button div.control-label {
    font-size: 110%;
}

/* Schriftgröße für Multiple Choice Multiple Items */
form.form-horizontal div.form-group.item-mc_multiple div.control-label {
    font-size: 110%;
}

/* Schriftgröße für Note Items */
form.form-horizontal div.form-group.item-note div.control-label {
    font-size: 110%;
}

/******************************************************************************
 * RESPONSIVE DESIGN - MOBILE & TABLET
 ******************************************************************************/

/*** SEHR KLEINE SMARTPHONES (bis 375px) ***/
/* iPhone SE, kleine Android-Geräte */
@media screen and (max-width: 375px) {
    /* Kleinere Schriftgröße für Slider-Labels */
    form.form-horizontal div.form-group.item-rating_button div.controls .controls-inner label.keep-label {
        font-size: 0.800em;
    }
    
    /* Erhöhter Abstand über Button-Gruppen */
    form.form-horizontal div.form-row.form-group.item-rating_button .btn-group {
        margin-top: 10px;
    }
    
    /* Anker/Fragen-Anpassungen für kleine Bildschirme */
    form.form-horizontal div.form-group.item-rating_button .control-label {
        font-size: 0.85em;
        padding-bottom: 10px;
    }
    
     /* Anker/Fragen-Anpassungen für kleine Bildschirme */
    form.form-horizontal div.form-group.item-rating_button .control-label {
        font-size: 0.85em;
        padding-bottom: 5px; /* Reduziert von 10px auf 5px */
    }
    
    /* Zusätzlicher Abstand zwischen Form-Gruppen */
    form.form-horizontal div.form-group.item-rating_button {
        margin-bottom: 30px; /* Fügt Abstand nach jedem Item hinzu */
    }
}

/*** KLEINE BIS MITTELGROSSE SMARTPHONES (376px - 768px) ***/
/* iPhone 12/13/14, Standard Android-Phones */
@media screen and (min-width: 376px) and (max-width: 768px) {
    /* Slider auf volle Breite strecken */
    form.form-horizontal div.form-group.item-rating_button div.controls .controls-inner {
        float: none;
        position: relative;
        width: 100%;
    }
    
    /* Optimierte Schriftgröße für Slider-Labels */
    form.form-horizontal div.form-group.item-rating_button div.controls .controls-inner label.keep-label {
        font-size: 0.875em;
    }
    
    /* Anker-Anpassungen */
    form.form-horizontal div.form-group.item-rating_button .control-label {
        float: none;
        width: 100%;
        text-align: left;
        font-size: 0.95em;
        margin-bottom: 15px;
    }
}

/*** iPAD UND TABLETS - HOCHFORMAT (769px - 1024px) ***/
/* iPad Mini (768x1024), iPad/Air (810x1080), iPad Pro 11" (834x1194) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* Optimierte Breite für Tablet-Ansicht */
    form.form-horizontal div.form-group.item-rating_button div.controls .controls-inner {
        float: none;
        position: relative;
        width: 100%;
        max-width: 100%;
    }
    
    /* Angemessene Abstände für Tablet */
    form.form-horizontal div.form-row.form-group.item-rating_button .btn-group {
        margin-top: -30px; /* Angepasst für bessere Positionierung über Labels */
    }
    
    /* Lesbare Schriftgröße für Slider-Labels auf Tablets */
    form.form-horizontal div.form-group.item-rating_button div.controls .controls-inner label.keep-label {
        font-size: 0.95em;
    }
    
    /* Anker-Anpassungen für iPad Hochformat */
    form.form-horizontal div.form-group.item-rating_button .control-label {
        float: none;
        width: 100%;
        text-align: left;
        font-size: 1.05em;
        margin-bottom: 40px; /* Konsistent mit Desktop-Einstellung */
        line-height: 1.4;
    }
    
    /* Falls Anker in separaten Spalten sind */
    form.form-horizontal div.form-group.item-rating_button > label {
        float: none;
        width: 100%;
        text-align: left;
        padding-right: 0;
    }
    
    /* Größere Touch-Targets für bessere Bedienbarkeit */
    .analogue_rating_scale .btn-group > .btn {
        height: 18px;
        width: 12px;
        padding: 3.5% 3.5% 3.5% 3.5%;
    }
}

/*** GROSSE iPADS UND QUERFORMAT (1025px - 1366px) ***/
/* iPad Pro 12.9" (1024x1366), iPad im Landscape-Modus */
@media screen and (min-width: 1025px) and (max-width: 1366px) {
    /* Zentrierte, aber nicht zu breite Darstellung */
    form.form-horizontal div.form-group.item-rating_button div.controls .controls-inner {
        float: none;
        position: relative;
        width: 90%;
        max-width: 900px;
        margin: 0 auto;
    }
    
    /* Slider-Positionierung angepasst */
    form.form-horizontal div.form-row.form-group.item-rating_button .btn-group {
        margin-top: -40px; /* Über den Labels positioniert */
    }
    
    /* Standard Schriftgröße für Slider-Labels */
    form.form-horizontal div.form-group.item-rating_button div.controls .controls-inner label.keep-label {
        font-size: 1em;
    }
    
    /* Anker-Anpassungen für große iPads */
    form.form-horizontal div.form-group.item-rating_button .control-label {
        font-size: 1.1em;
        margin-bottom: 45px;
        line-height: 1.5;
    }
    
    /* Zentrierte Anker wenn Content zentriert ist */
    form.form-horizontal div.form-group.item-rating_button > label {
        width: 90%;
        max-width: 900px;
        margin: 0 auto;
        float: none;
        text-align: left;
    }
    
    /* Leicht größere Buttons für große Bildschirme */
    .analogue_rating_scale .btn-group > .btn {
        height: 20px;
        width: 14px;
    }
}

/*** ALLGEMEINE TABLET-VERBESSERUNGEN (768px - 1366px) ***/
@media screen and (min-width: 768px) and (max-width: 1366px) {
    /* Bessere Lesbarkeit durch Textumbruch */
    form.form-horizontal div.form-group.item-rating_button .control-label,
    form.form-horizontal div.form-group.item-rating_button > label {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Touch-Optimierung: Größere klickbare Bereiche für alle Buttons */
    form.form-horizontal div.form-group.item-mc_button .btn,
    form.form-horizontal div.form-group.item-mc_multiple .btn {
        min-height: 44px; /* Apple Empfehlung für Touch-Targets */
        padding: 12px 20px;
    }
    
    /* Besserer Abstand zwischen klickbaren Elementen */
    form.form-horizontal div.form-group .btn-group .btn {
        margin: 2px;
    }
}