/* Elementor Favorites - Clean Typography + Alignment
   --------------------------------------------------
   - Button uses native Elementor button structure/classes
   - Alignment handled by prefix_class on widget wrapper
*/

/* ========== FAVORITE BUTTON ========== */

/* Wrapper - default inline-block */
.ef-favorite-button-container {
    display: inline-block;
}

/* Alignment Controls 
   prefix_class adds: elementor-align-{value} / elementor-align-tablet-{value} / elementor-align-mobile-{value}
*/

/* Left align - default */
.elementor-widget-ef_favorite_button.elementor-align-left {
    text-align: left;
}

.elementor-widget-ef_favorite_button.elementor-align-left .ef-favorite-button-container {
    display: inline-block;
}

/* Center align */
.elementor-widget-ef_favorite_button.elementor-align-center {
    text-align: center;
}

.elementor-widget-ef_favorite_button.elementor-align-center .ef-favorite-button-container {
    display: inline-block;
}

/* Right align */
.elementor-widget-ef_favorite_button.elementor-align-right {
    text-align: right;
}

.elementor-widget-ef_favorite_button.elementor-align-right .ef-favorite-button-container {
    display: inline-block;
}

/* Justify (Full Width Stretch) */
.elementor-widget-ef_favorite_button.elementor-align-justify .ef-favorite-button-container {
    display: block !important;
    width: 100% !important;
}

.elementor-widget-ef_favorite_button.elementor-align-justify .ef-favorite-button {
    width: 100% !important;
    justify-content: center;
}

/* Tablet Alignment */
@media (max-width: 1024px) {
    .elementor-widget-ef_favorite_button.elementor-align-tablet-left {
        text-align: left;
    }
    
    .elementor-widget-ef_favorite_button.elementor-align-tablet-center {
        text-align: center;
    }
    
    .elementor-widget-ef_favorite_button.elementor-align-tablet-right {
        text-align: right;
    }
    
    .elementor-widget-ef_favorite_button.elementor-align-tablet-justify .ef-favorite-button-container {
        display: block !important;
        width: 100% !important;
    }
    
    .elementor-widget-ef_favorite_button.elementor-align-tablet-justify .ef-favorite-button {
        width: 100% !important;
    }
}

/* Mobile Alignment */
@media (max-width: 767px) {
    .elementor-widget-ef_favorite_button.elementor-align-mobile-left {
        text-align: left;
    }
    
    .elementor-widget-ef_favorite_button.elementor-align-mobile-center {
        text-align: center;
    }
    
    .elementor-widget-ef_favorite_button.elementor-align-mobile-right {
        text-align: right;
    }
    
    .elementor-widget-ef_favorite_button.elementor-align-mobile-justify .ef-favorite-button-container {
        display: block !important;
        width: 100% !important;
    }
    
    .elementor-widget-ef_favorite_button.elementor-align-mobile-justify .ef-favorite-button {
        width: 100% !important;
    }
}

/* Button – shares look/behavior with native .elementor-button */
.ef-favorite-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: inherit;
    line-height: inherit;
    transition: all 0.3s ease;
}

/* All children inherit font-size / line-height from the button */
.ef-favorite-button,
.ef-favorite-button .ef-favorite-icon,
.ef-favorite-button .ef-favorite-label,
.ef-favorite-button i,
.ef-favorite-button svg {
    font-size: inherit;
    line-height: inherit;
}

/* Hover & Focus */
.ef-favorite-button:hover,
.ef-favorite-button:focus {
    text-decoration: none;
    outline: none;
}

.ef-favorite-button:focus-visible {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

/* Icon + label wrapper – gap controlled by icon_spacing */
.ef-favorite-inner {
    display: inline-flex;
    align-items: center;
    gap: inherit;
}

/* Icon wrapper */
.ef-favorite-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 1em;
    height: 1em;
}

/* Two icons (fav / unfav) stacked */
.ef-favorite-button .ef-favorite-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG icon */
.ef-favorite-button .ef-favorite-icon svg {
    width: 1em;
    height: 1em;
    display: block;
    fill: currentColor;
    transform: none;
}

/* <i> icon */
.ef-favorite-button .ef-favorite-icon i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
}

/* Label */
.ef-favorite-button .ef-favorite-label {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* Icon visibility states */
.ef-favorite-button .ef-icon-fav {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ef-favorite-button .ef-icon-unfav {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ef-favorite-button.is-favorited .ef-icon-fav {
    opacity: 1;
    visibility: visible;
}

.ef-favorite-button.is-favorited .ef-icon-unfav {
    opacity: 0;
    visibility: hidden;
}

/* Small normalizations */
.ef-favorite-icon-wrap svg,
.ef-favorite-icon-wrap i {
    vertical-align: middle;
    display: inline-block;
}

/* ========== FAVORITES LINK ========== */

.ef-favorites-link-widget {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.ef-favorites-link-widget:hover {
    text-decoration: none;
}

.ef-favorites-link-widget .ef-favorites-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ef-favorites-link-widget .ef-favorites-icon svg {
    width: 1em;
    height: 1em;
    display: block;
    fill: currentColor;
}

.ef-favorites-link-widget .ef-favorites-counter-wrap {
    display: inline-flex;
}

/* Plain indicator */
.ef-favorites-link-wrapper.ef-indicator-plain .ef-favorites-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5em;
    background: none;
    border-radius: 0;
    padding: 0;
    line-height: inherit;
}

/* Bubble indicator */
.ef-favorites-link-wrapper.ef-indicator-bubble .ef-favorites-counter-wrap {
    position: absolute;
    top: -4px;
    right: -6px;
}

.ef-favorites-link-wrapper.ef-indicator-bubble .ef-favorites-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    min-height: 18px;
    padding: 2px 6px;
    border-radius: 999px;
    background-color: #e53935;
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
}

/* Hide counter if empty */
.ef-favorites-link-widget .ef-favorites-counter:empty {
    display: none;
}

/* Elementor Editor Preview için placeholder */
.ef-favorites-link-wrapper.ef-indicator-bubble .ef-favorites-counter:empty::before {
    content: '0';
    opacity: 0.3;
}

/* ========== TOAST MESSAGE ========== */

.ef-favorites-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ef-favorites-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 767px) {
    .ef-favorites-toast {
        right: 10px;
        bottom: 10px;
        font-size: 13px;
        padding: 10px 14px;
    }
}