/**
 * LDE Global Styles
 *
 * Shared design tokens and utility classes for all LDE plugins.
 * Used across lde-courses, lde-module-landingpages, fgs-lde-wishlist,
 * and other LDE ecosystem plugins.
 *
 * @package LDE Courses
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --lde-primary-color: #32B7B7;
    --lde-accent-color: #0B6F6F;
    --lde-purple-color: #8682be;
}

/* ==========================================================================
   Flex Utilities
   ========================================================================== */

.flex {
    display: flex;
}

.left-align {
    display: flex;
    justify-content: flex-start;
}

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

.center-align {
    display: flex;
    justify-content: center;
}

.spaced-align {
    display: flex;
    justify-content: space-between;
}

.top-align {
    display: flex;
    align-items: flex-start !important;
}

.bottom-align {
    display: flex;
    align-items: flex-end !important;
}

.middle-align {
    display: flex;
    align-items: center !important;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

.mobile-only {
    display: none;
}

@media screen and (max-width: 550px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    .mobile-only.flex,
    .mobile-only.left-align,
    .mobile-only.right-align,
    .mobile-only.center-align,
    .mobile-only.spaced-align,
    .mobile-only.top-align,
    .mobile-only.bottom-align,
    .mobile-only.middle-align {
        display: flex;
    }
}

/* ==========================================================================
   Global Buttons
   ========================================================================== */

.lde-global-info-button,
.lde-global-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 11px;
    height: 40px;
    padding: 0 12px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.lde-global-info-button img {
    width: 1.3rem;
    margin-right: 0.5rem;
}

.primary-bg {
    background-color: var(--lde-primary-color);
}

.accent-hover-bg {
    transition: background-color 0.3s ease;
}

.accent-hover-bg:hover {
    background-color: var(--lde-accent-color);
}

/* ==========================================================================
   Tooltips
   ========================================================================== */

.lde-tooltip {
    ---space: -0.5rem;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #67737c;
    color: #fff;
    font-size: 0.75rem;
    text-align: center;
    border-radius: 0.25rem;
    padding: 0.5rem;
    position: absolute;
    z-index: 3;
    inset: 0 auto auto 50%;
    inline-size: auto;
    white-space: nowrap;
    font-weight: 500;
    opacity: 0;
    transition: all 0.2s;
    line-height: normal;
    transform: translate(-50%, -100%) scale(0.9);
}

:hover > .lde-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -100%) scale(1);
}

/* Tooltip: Left */
.lde-tooltip.left {
    inset: 50% auto auto 0;
    margin-inline: var(---space) !important;
}

:hover > .lde-tooltip.left {
    transform: translate(-100%, -50%) scale(1);
}

/* Tooltip: Right */
.lde-tooltip.right {
    inset: 50% 0 auto auto;
    transform: translate(100%, -50%) scale(1);
    margin-inline: var(---space) !important;
}

:hover > .lde-tooltip.right {
    transform: translate(100%, -50%) scale(1);
}

/* Tooltip: Top (default) */
.lde-tooltip:not(.left, .right, .bottom) {
    margin-block-start: var(---space) !important;
}

/* Tooltip: Bottom */
.lde-tooltip.bottom {
    inset: auto auto 0 50%;
    transform: translate(-50%, 100%) scale(0.9);
    margin-block-end: var(---space) !important;
}

:hover > .lde-tooltip.bottom {
    transform: translate(-50%, 100%) scale(1);
}