/*
 * Frontend styles for Pointer Excursion Prices.
 * Elementor controls can override colors, spacing and dimensions.
 */

.ep-price {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

.ep-price .ep-price-currency {
    margin-left: var(--ep-price-currency-gap, 4px);
}

/* Legacy shortcode switcher. Kept for backwards compatibility. */
.ep-currency-switcher {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.ep-currency-switcher a {
    text-decoration: none;
    cursor: pointer;
}

.ep-currency-switcher a.active {
    font-weight: 700;
}

.ep-elementor-price-wrapper,
.ep-currency-widget-wrap {
    display: block;
}

.ep-currency-widget {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 10;
}

.ep-currency-trigger,
.ep-currency-option {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    font: inherit;
    color: inherit;
}

.ep-currency-trigger:focus,
.ep-currency-option:focus {
    outline: none;
}

.ep-currency-trigger:focus-visible .ep-currency-control,
.ep-currency-option:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.ep-currency-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    --ep-symbol-gap: -8px;
    --ep-symbol-y: 0px;
    --ep-symbol-icon-x: 0px;
    --ep-symbol-icon-y: 0px;
    --ep-button-text-x: 0px;
    --ep-button-text-y: 0px;
}

.ep-currency-control {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: stretch;
    justify-content: center;
    min-width: 110px;
    min-height: 52px;
    border: 1px solid #6f22f2;
    border-radius: 999px;
    background: #6f22f2;
    color: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.ep-currency-button-label {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    min-height: inherit;
    box-sizing: border-box;
}

.ep-currency-current-code,
.ep-currency-option-code {
    line-height: 1;
    white-space: nowrap;
    font-weight: 700;
}

.ep-currency-current-code {
    display: inline-block;
    transform: translate(var(--ep-button-text-x, 0px), var(--ep-button-text-y, 0px));
}

.ep-currency-symbol-box {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #6f22f2;
    overflow: hidden;
    line-height: 1;
    box-sizing: border-box;
}

.ep-currency-toggle .ep-currency-symbol-box {
    position: absolute;
    top: 50%;
    right: calc(100% + var(--ep-symbol-gap, -8px));
    z-index: 2;
    transform: translateY(calc(-50% + var(--ep-symbol-y, 0px)));
    background: #ffffff;
    color: #6f22f2;
}

.ep-currency-symbol-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1em;
    min-height: 1em;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    color: currentColor;
    text-align: center;
}

.ep-currency-toggle .ep-currency-symbol-text,
.ep-currency-toggle .ep-currency-flag-img {
    transform: translate(var(--ep-symbol-icon-x, 0px), var(--ep-symbol-icon-y, 0px));
}

.ep-currency-flag-img {
    display: block;
    width: 18px;
    height: 18px;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.ep-currency-arrow-box {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    min-height: 100%;
    margin-left: 0;
    background: transparent;
    color: #ffffff;
    box-sizing: border-box;
}

.ep-currency-widget[data-arrow-style="simple"] .ep-currency-arrow-box {
    width: auto;
    min-width: 0;
    padding-left: 0;
    padding-right: 14px;
    background: transparent !important;
}

.ep-currency-arrow-svg {
    display: block;
    width: 16px;
    height: 16px;
    color: currentColor;
    stroke: currentColor;
    transition: transform .18s ease;
}

.ep-currency-arrow-svg path {
    stroke: currentColor;
}

.ep-currency-widget.is-open .ep-currency-arrow-svg {
    transform: rotate(180deg);
}

.ep-currency-widget[data-show-symbol="no"] .ep-currency-control {
    min-width: 120px;
}

.ep-currency-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    display: none;
    min-width: 100%;
    z-index: 99;
}

.ep-currency-widget.is-open .ep-currency-dropdown {
    display: block;
}

.ep-currency-dropdown-list {
    display: flex;
    flex-direction: column;
    min-width: 230px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    box-sizing: border-box;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .08);
}

.ep-currency-option {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(42px, auto) 1fr;
    align-items: center;
    justify-content: stretch;
    column-gap: 12px;
    min-height: 52px;
    padding: 8px 16px;
    border: 0;
    border-bottom: 1px solid #eef0f4;
    border-radius: 0;
    background: transparent;
    color: #111827;
    box-sizing: border-box;
    text-align: left;
    transition: background-color .18s ease, color .18s ease;
}

.ep-currency-option:last-child {
    border-bottom-width: 0;
}

.ep-currency-option:hover {
    background: #f8f5ff;
}

.ep-currency-option .ep-currency-symbol-box {
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: #6f22f2;
    border: 0 solid rgba(0, 0, 0, 0);
    color: #ffffff;
}

.ep-currency-option-code {
    min-width: 42px;
    text-align: left;
    color: #111827;
}

.ep-currency-option-name {
    font-size: 13px;
    line-height: 1.2;
    color: #4b5563;
    white-space: nowrap;
}

.ep-currency-option[hidden] {
    display: none !important;
}

.ep-currency-widget[data-show-symbol="no"] .ep-currency-option {
    grid-template-columns: minmax(42px, auto) 1fr;
}

@media (max-width: 767px) {
    .ep-currency-dropdown {
        left: 0;
        right: auto;
    }

    .ep-currency-option-name {
        font-size: 12px;
    }
}
