/**
 * Back Button Component Styles (Subtle & Spaced)
 * File: assets/css/back-button.css
 */

 .tppl-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    margin: 20px 0 20px 40px; /* LEFT MARGIN: 40px spacing from screen edge */
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, rgba(122, 62, 163, 0.3) 0%, rgba(156, 107, 255, 0.25) 100%); /* Subtle purple gradient, very translucent */
    border: 1px solid rgba(156, 107, 255, 0.2); /* Faint purple border */
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(122, 62, 163, 0.15); /* Very soft shadow */
    backdrop-filter: blur(10px); /* Glass effect */
}

.tppl-back-button:hover {
    background: linear-gradient(135deg, rgba(122, 62, 163, 0.45) 0%, rgba(156, 107, 255, 0.4) 100%); /* Slightly more visible on hover */
    transform: translateX(-6px);
    box-shadow: 0 4px 16px rgba(122, 62, 163, 0.25);
    border-color: rgba(156, 107, 255, 0.4);
}

.tppl-back-button:focus {
    outline: 3px solid rgba(156, 107, 255, 0.5);
    outline-offset: 3px;
}

.tppl-back-button:active {
    transform: translateX(-3px) scale(0.98);
}

/* Arrow icon */
.tppl-back-button::before {
    content: "←";
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.tppl-back-button:hover::before {
    transform: translateX(-3px);
}

/* Inline positioning (default for hub pages) */
.tppl-back-button-inline {
    display: inline-flex;
}

/* Sticky positioning for mobile single posts */
@media (max-width: 768px) {
    .tppl-back-button-sticky {
        position: sticky;
        top: 20px;
        z-index: 100;
        margin-bottom: 20px;
        margin-left: 20px; /* Reduced left margin on mobile */
        width: fit-content;
    }
}

/* Accessibility: High contrast mode support */
@media (prefers-contrast: high) {
    .tppl-back-button {
        border: 2px solid rgba(156, 107, 255, 0.8);
        background: rgba(122, 62, 163, 0.6);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tppl-back-button,
    .tppl-back-button::before {
        transition: none;
    }
}