/* CSS Variables from JS injection: --lm-primary, --lm-tr-bg, --lm-tr-text, --lm-tr-size, --lm-tr-pad, --lm-tr-rad, --lm-popup-bg, --lm-popup-text, --lm-popup-rad, --lm-popup-width */

.lm-custom-trigger {
    background-color: var(--lm-tr-bg, #0073aa);
    color: var(--lm-tr-text, #ffffff) !important;
    padding: var(--lm-tr-pad, 10px 20px);
    border-radius: var(--lm-tr-rad, 4px);
    font-size: var(--lm-tr-size, 16px);
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s;
    border: none;
    cursor: pointer;
}

.lm-custom-trigger:hover {
    opacity: 0.9;
    color: var(--lm-tr-text, #ffffff) !important;
}

#lm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

#lm-modal {
    background: var(--lm-popup-bg, #fff);
    width: 90%;
    max-width: var(--lm-popup-width, 400px);
    border-radius: var(--lm-popup-rad, 8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    color: var(--lm-popup-text, #333);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

#lm-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--lm-popup-text, #888);
    opacity: 0.7;
    z-index: 10;
}

#lm-close:hover {
    opacity: 1;
}

.lm-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.lm-tab {
    flex: 1;
    border: none;
    background: rgba(0, 0, 0, 0.02);
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
    color: var(--lm-popup-text, #666);
    opacity: 0.7;
    transition: all 0.2s;
}

.lm-tab.active {
    background: var(--lm-popup-bg, #fff);
    color: var(--lm-primary, #0073aa);
    border-top: 3px solid var(--lm-primary, #0073aa);
    opacity: 1;
}

.lm-content {
    padding: 20px 30px 30px;
}

.lm-panel {
    display: none;
    animation: fadeIn 0.3s;
}

.lm-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lm-group {
    margin-bottom: 15px;
}

.lm-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--lm-popup-text, #333);
    font-size: 14px;
}

.lm-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    /* WP themes sometimes miss this */
    background: #fff;
    /* Ensure inputs stay white regardless of popup bg */
    color: #333;
}

.lm-group input:focus {
    border-color: var(--lm-primary, #0073aa);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--lm-primary-rgb), 0.1);
}

/* Password Toggle */
.lm-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lm-password-wrap input {
    width: 100%;
    padding-right: 40px;
    /* Space for icon */
}

.lm-toggle-pass {
    position: absolute;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #888;
    user-select: none;
}

.lm-toggle-pass:hover {
    color: #333;
}

/* Select Styling */
.lm-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #333;
    height: 40px;
    /* Match input height */
}

.lm-group-check {
    margin-bottom: 20px;
    font-size: 14px;
}

.lm-btn {
    width: 100%;
    padding: 12px;
    background: var(--lm-primary, #0073aa);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.lm-btn:hover {
    opacity: 0.9;
}

.lm-msg {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    display: none;
}

.lm-msg.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    display: block;
}

.lm-msg.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    display: block;
}