/**
 * Animation Effects Settings Styles
 *
 * Styles for the Animation Effects Settings section in popup editor
 * Scoped to .ipb-animation-effects to avoid affecting other sections
 */

/* Animation Effects Settings Section - 2-Column Layout */
.ipb-animation-effects {
    text-align: left;
}

.ipb-animation-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.ipb-animation-row:last-child {
    margin-bottom: 0;
}

.ipb-animation-label {
    align-self: center;
    text-align: left;
}

.ipb-animation-label label {
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
    margin: 0;
    line-height: 1.4;
    text-align: left;
}

.ipb-animation-control {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-self: center;
    text-align: left;
}

.ipb-animation-control .regular-text {
    width: 100%;
    max-width: 100%;
}

/* Match Select Background horizontal sizing */
.ipb-animation-effects #animate_type.regular-text,
.ipb-animation-effects #animate_origin.regular-text {
    width: 50%;
    max-width: 50%;
}

.ipb-animation-effects #speed_range {
    width: calc(50% - 92px) !important;
    flex: 0 0 calc(50% - 92px) !important;
}

.ipb-animation-helper {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #646970;
    line-height: 1.4;
    text-align: left;
}

/* Input Styles */
.ipb-animation-effects input[type="number"] {
    height: 40px;
    padding: 0 8px;
    border: 1px solid #8c8f94;
    border-radius: 2px;
    font-size: 14px;
    color: #2c3338;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out;
    text-align: center;
}

.ipb-animation-effects input[type="number"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.ipb-animation-effects select.regular-text {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #8c8f94;
    border-radius: 2px;
    font-size: 14px;
    color: #2c3338;
    background-color: #fff;
}

.ipb-animation-effects select.regular-text:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* Range Slider Styles */
.ipb-animation-effects input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.ipb-animation-effects input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2271b1;
    cursor: pointer;
}

.ipb-animation-effects input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2271b1;
    cursor: pointer;
    border: none;
}

.ipb-animation-effects input[type="range"]:focus {
    outline: none;
}

.ipb-animation-effects input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.ipb-animation-effects input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 782px) {
    .ipb-animation-effects #animate_type.regular-text,
    .ipb-animation-effects #animate_origin.regular-text {
        width: 100%;
        max-width: 100%;
    }

    .ipb-animation-effects #speed_range {
        width: 100% !important;
        flex: 1 1 auto !important;
    }

    .ipb-animation-row {
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: flex-start;
    }
    
    .ipb-animation-label {
        align-self: flex-start;
    }
    
    .ipb-animation-control {
        align-self: flex-start;
    }
    
    /* Stack slider and numeric input on mobile */
    .ipb-animation-control > div[style*="display: flex"] {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ipb-animation-control input[type="range"] {
        width: 100%;
    }
    
    .ipb-animation-control input[type="number"] {
        width: 100%;
    }
}
