/**
 * Maple Elements CSS
 * Version: 1.0.0
 * Author: Anthony Fralick - Little Ridge Tech Consulting
 * License: MIT
 */

/* TOGGLE SWITCHES */
.toggle-switch {
    display: inline-flex;       /* children side by side */
    align-items: center;        /* vertically center text with switch */
    gap: 8px;                   /* space between switch and text */
}

.toggle-switch input[type=checkbox] {
    margin-left:-27px; /* reset WP’s default 27px */
}

.toggle-switch .slider {
    flex-shrink: 0;             /* prevent slider from shrinking */
    width: 50px;                /* fixed size of the switch */
    height: 24px;
    position: relative;         /* so :before knob is positioned correctly */
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
    cursor: pointer;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-label {
    font-size: 14px;
    line-height: 1.4;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #2271b1; /* WP blue */
}
input:checked + .slider:before {
    transform: translateX(26px);
}
/* END TOGGLE SWITCHES */
/* START NUMBER FIELDS */
.number-field {
    display: inline-flex;       /* align input and label side by side */
    align-items: center;        /* vertical alignment */
    gap: 8px;                   /* spacing between input and text */
    position: relative;
    margin-left: -11px;
}

.number-field input[type="number"] {
    width: 60px;                /* or whatever width you want */
    flex-shrink: 0;             /* prevent shrinking */
}

.number-label {
    font-size: 14px;
    line-height: 1.4;
}
/* END NUMBER FIELDS */
.maple-field-description {
    font-size: 12px !important;
    color: #777;
}

/* START OF STATUS LIGHT */
/* Wrapper */
.maple-status-light-wrapper {
    display: inline-flex;
}

.label-top {
    flex-direction: column;
    align-items: center;
}

/* Panel container */
.panel {
    overflow: hidden;
    display: inline-flex;   /* instead of inline-block */
    align-items: center;    /* vertical centering */
    margin: -2px 0 0 0;
}


/* Base lamp size */
.status-light-md {
    margin: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
}

/* Red variants */
.sl-red { /* OFF */
    background-color: #a99999;
    border: 1px solid #a99999;
}

.sl-red-bold { /* ON */
    background-color: #ff1a1a; /* bright saturated red */
    border: 1px solid #ff1a1a;
    box-shadow:
            inset #600 0 -2px 11px,       /* bright inner glow */
            #600 0 0 4px,               /* strong red aura */
            #f00 0 0 8px;               /* extended glow */
}

/* Yellow variants */
.sl-yellow { /* OFF */
    background-color: #c9c7a6; /* muted olive yellow */
    border: 1px solid #c9c7a6;
}

.sl-yellow-bold { /* ON */
    background-color: #ffeb3b; /* bright vivid yellow */
    border: 1px solid #ffeb3b;
    box-shadow:
            inset #660 0 -2px 11px,
            #660 0 0 4px,
            #ff0 0 0 8px;
}

/* Green variants */
.sl-green { /* OFF */
    background-color: #8fa98f;
    border: 1px solid #8fa98f;
}

.sl-green-bold { /* ON */
    background-color: #4dff4d; /* brighter lime green base */
    border: 1px solid #4dff4d;
    box-shadow:
            inset #0a660a 0 -2px 11px,   /* darker inner glow for depth */
            #0a660a 0 0 4px,             /* vivid lime aura close to lamp */
            #0f0 0 0 8px;               /* extended bright green glow */
}


/* END OF STATUS LIGHT */

/* MODAL STYLES */
.maple-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.maple-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.maple-modal-container {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: maple-modal-fadein 0.3s ease-out;
}

@keyframes maple-modal-fadein {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.maple-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
}

.maple-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.maple-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 5px;
    line-height: 1;
}

.maple-modal-close:hover {
    color: #333;
}

.maple-modal-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.maple-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    text-align: right;
}

/* BUBBLE STYLES */
.maple-bubble {
    display: inline-flex;
    align-items: center;
    background: #e1f0ff;
    border: 1px solid #b3d7ff;
    border-radius: 16px;
    padding: 4px 12px;
    margin: 4px;
    font-size: 13px;
    color: #004085;
}

.maple-bubble-label {
    font-weight: 500;
}

.maple-bubble-value {
    margin-left: 5px;
    color: #555;
    font-style: italic;
}

.maple-bubble-remove {
    background: none;
    border: none;
    margin-left: 8px;
    cursor: pointer;
    color: #004085;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    opacity: 0.6;
}

.maple-bubble-remove:hover {
    opacity: 1;
    color: #c00;
}