/**
 * Knowledge Base Vor/Zurück-Navigation Styling
 *
 * @package KNOWLEDGEBASE_MYLP
 * @since 2.1.0
 */

/* Container für die gesamte Vor/Zurück-Navigation */
.kb-prevnext-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Ausrichtung des Containers */
.kb-prevnext-align-left {
    justify-content: flex-start;
}

.kb-prevnext-align-center {
    justify-content: center;
}

.kb-prevnext-align-right {
    justify-content: flex-end;
}

/* Container für die individuellen Buttons */
.kb-prev-button-container,
.kb-next-button-container {
    display: flex;
    flex: 1;
    min-width: 150px;
}

.kb-prev-button-container {
    justify-content: flex-start;
    margin-right: 0.5rem;
}

.kb-next-button-container {
    justify-content: flex-end;
    margin-left: 0.5rem;
}

/* Grundlegende Button-Stile */
.kb-prevnext-button {
    display: inline-flex;
    align-items: center;
    padding: 0.70rem 1.4rem;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

/* Primary Button Style (Standard) */
.kb-prevnext-button-primary {
    background-color: var(--e-global-color-primary);
    color: var(--mylp-text-on-primary, var(--e-global-color-text));
}

.kb-prevnext-button-primary:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    opacity: 0.9;
    background-color: var(--e-global-color-primary);
    color: var(--mylp-text-on-primary, var(--e-global-color-text));
}

/* Secondary Button Style */
.kb-prevnext-button-secondary {
    background-color: var(--e-global-color-accent);
    color: var(--mylp-text-on-accent, var(--e-global-color-secondary));
}

.kb-prevnext-button-secondary:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    opacity: 0.9;
    background-color: var(--e-global-color-accent);
    color: var(--mylp-text-on-accent, var(--e-global-color-secondary));
}

/* Icon Styling */
.kb-prevnext-button .icon {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
}

/* Button Text-Wrapper für mehrzeilige Darstellung */
.kb-button-text-wrapper {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.3;
}

/* Artikel-Titel kleiner und leichter darstellen */
.kb-article-title {
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 0.3rem;
    opacity: 0.85;
    max-width: 100%;
    word-wrap: break-word;
    display: block;
}

/* Vorheriger-Link spezifisches Styling */
.kb-prev-button .icon {
    margin-right: 0.75rem;
    align-self: center;
}

/* Nächster-Link spezifisches Styling */
.kb-next-button .icon {
    margin-left: 0.75rem;
    align-self: center;
}

/* Back-Button spezifisches Styling */
.kb-back-button .icon {
    margin-right: 0.75rem;
    align-self: center;
}

.kb-back-button {
    min-width: 220px;
    width: auto;
    justify-content: flex-start;
}

/* Back-Button Container-Styling */
.kb-back-button-container {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* Ausrichtungsklassen für Back-Button */
.kb-back-button-align-left {
    justify-content: flex-start;
}

.kb-back-button-align-center {
    justify-content: center;
}

.kb-back-button-align-right {
    justify-content: flex-end;
}

.kb-back-button-wrapper {
    display: flex;
    min-width: 220px;
    width: auto;
}

/* Anpassungen für die width-Parameter */

/* Prozentuale Breiten - volle Breite */
.kb-back-button-wrapper[style*="%"] .kb-back-button {
    width: 100%;
}

/* 100% Breite */
.kb-back-button-wrapper[style*="width: 100%"] .kb-back-button {
    width: 100%;
}

/* Pixel-basierte Breiten */
.kb-back-button-wrapper[style*="px"] .kb-back-button {
    justify-content: flex-start;
    text-align: left;
}

/* Standard für normale Breiten */
.kb-back-button-wrapper:not([style*="%"]):not([style*="px"]) .kb-back-button {
    justify-content: flex-start;
}

/* Textausrichtung innerhalb des Buttons */
.kb-back-button.kb-button-text-left {
    justify-content: flex-start !important;
    text-align: left !important;
}

.kb-back-button.kb-button-text-center {
    justify-content: center !important;
    text-align: center !important;
}

.kb-back-button.kb-button-text-right {
    justify-content: flex-end !important;
    text-align: right !important;
}

/* Anpassungen für width-Parameter bei Vor/Zurück-Container */
.kb-prevnext-container[style*="%"],
.kb-prevnext-container[style*="width"] {
    justify-content: center;
}

/* Prozentuale Breiten für Vor/Zurück-Buttons */
.kb-prevnext-container[style*="%"] .kb-prev-button,
.kb-prevnext-container[style*="%"] .kb-next-button {
    width: 100%;
}

/* 100% Breite für Vor/Zurück-Buttons */
.kb-prevnext-container[style*="width: 100%"] .kb-prev-button,
.kb-prevnext-container[style*="width: 100%"] .kb-next-button {
    width: 100%;
}

/* Textausrichtung innerhalb der Vor/Zurück-Buttons */
.kb-prev-button.kb-button-text-left,
.kb-next-button.kb-button-text-left {
    justify-content: flex-start !important;
    text-align: left !important;
}

.kb-prev-button.kb-button-text-center,
.kb-next-button.kb-button-text-center {
    justify-content: center !important;
    text-align: center !important;
}

.kb-prev-button.kb-button-text-right,
.kb-next-button.kb-button-text-right {
    justify-content: flex-end !important;
    text-align: right !important;
}

/* Anpassung des Button-Paddings für mehrzeilige Buttons */
.kb-prevnext-button {
    padding: 1rem 1.4rem;
    align-items: center;
    min-width: 160px;
}

/* Zusätzliche Ausrichtung für den Text-Wrapper */
.kb-button-text-wrapper {
    align-self: center;
}

/* Pfeil-Icons */
.kb-prevnext-button .arrow-left,
.kb-prevnext-button .arrow-right {
    position: relative;
    display: inline-flex;
    width: 1em;
    height: 1em;
}

/* Pfeil nach links */
.kb-prevnext-button .arrow-left::before {
    content: '';
    width: 0.6em;
    height: 0.6em;
    border-left: 0.2em solid currentColor;
    border-bottom: 0.2em solid currentColor;
    transform: rotate(45deg);
    display: block;
}

/* Pfeil nach rechts */
.kb-prevnext-button .arrow-right::before {
    content: '';
    width: 0.6em;
    height: 0.6em;
    border-right: 0.2em solid currentColor;
    border-top: 0.2em solid currentColor;
    transform: rotate(45deg);
    display: block;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .kb-prevnext-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .kb-prev-button-container,
    .kb-next-button-container {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .kb-prev-button,
    .kb-next-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .kb-prevnext-button {
        padding: 0.625rem 1.125rem;
        font-size: 0.875rem;
    }
}
