/* ==========================================================================
   LuvMyRecipe: AI Recipe Scaling & Conversion UI
   ========================================================================== */

.lmr-unit-toggle-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 25px;
    width: 100%;
}

.lmr-unit-toggle {
    display: inline-flex;
    background-color: #fff2b6;
    border: 1px solid #ddc982;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.lmr-unit-toggle input[type="radio"] {
    display: none; /* Hide the native radio dot completely */
}

/* Base label styling */
.lmr-unit-toggle label {
    padding: 6px 18px;
    font-size: 13px;
    font-weight: bold;
    color: #8b4513;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 !important; /* Forces override of theme label styles */
    z-index: 1;
}

/* Hover state for unselected pills */
.lmr-unit-toggle input[type="radio"]:not(:checked) + label:hover {
    background-color: #ffe680;
}

/* Checked/Active state using the LMR tomato red */
.lmr-unit-toggle input[type="radio"]:checked + label {
    background-color: #ff6347;
    color: #ffffff;
}

/* --- Animated Loading Ellipses --- */
.lmr-convert-loading {
    display: none;
    align-items: center;
    margin-left: 12px;
    font-size: 13px;
    color: #8b4513;
    font-weight: bold;
}

/* Triggered via JS during AJAX request */
.lmr-convert-loading.active {
    display: flex;
}

.lmr-loading-dots {
    display: inline-block;
    min-width: 75px; /* Prevents the container from jumping horizontally as dots are added */
}

.lmr-loading-dots::after {
    content: '';
    animation: lmr-convert-dots 1.5s infinite;
}

@keyframes lmr-convert-dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}