/* Egbongym Tools Styles */

.egbongym-tool {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.egbongym-tool h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Settings Bar */
.eg-settings-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    color: #333 !important; /* Force dark text */
}

.eg-toggle-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: #333 !important;
}

.eg-checkbox-simple label {
    color: #333 !important;
    font-weight: bold;
}

/* Switch Slider */
.eg-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.eg-switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.eg-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}
.eg-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}
input:checked + .eg-slider {
    background-color: #0073aa;
}
input:checked + .eg-slider:before {
    transform: translateX(24px);
}
.eg-slider.round {
    border-radius: 34px;
}
.eg-slider.round:before {
    border-radius: 50%;
}

.eg-input-group {
    margin-bottom: 15px;
}

.eg-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.eg-input-group input[type="number"],
.eg-input-group input[type="text"],
.eg-input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* Inventory Grid */
.eg-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}
.eg-inv-item {
    background: #f5f5f5;
    padding: 5px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #ddd;
}
.eg-inv-item label {
    font-size: 0.8rem;
    margin-bottom: 2px;
    display: block;
}
.eg-inv-item input {
    width: 100% !important;
    padding: 5px !important;
    text-align: center;
}

.eg-row {
    display: flex;
    gap: 15px;
}

.eg-row .eg-input-group {
    flex: 1;
}

.eg-btn {
    background-color: #10b981;
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.eg-btn:hover {
    background-color: #059669;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.eg-btn-secondary {
    background-color: #6c757d;
}
.eg-btn-secondary:hover {
    background-color: #5a6268;
}

.eg-btn-danger {
    background-color: #dc3545;
}

.eg-btn-group {
    display: flex;
    gap: 10px;
}

.eg-result {
    margin-top: 20px;
    padding: 15px;
    background: #f1f1f1;
    color: #333;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.eg-result h4 {
    color: #23282d;
    margin-top: 0;
}

.eg-result p, .eg-result li {
    color: #333;
}

.eg-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.eg-checkbox-group label {
    font-weight: normal;
    cursor: pointer;
    background: #eee;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* RIR Slider */
#rir-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: #e0e0e0; /* Light Grey base */
    outline: none;
    opacity: 0.9;
    transition: opacity .2s;
    border-radius: 5px;
    border: 1px solid #ccc;
}
#rir-slider:hover {
    opacity: 1;
}
#rir-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #0073aa;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
#rir-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #0073aa;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Plate Loader Visuals */
.pl-visual-bar {
    margin-top: 20px;
    position: relative;
    height: 60px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.bar-end {
    width: 40px;
    height: 40px;
    background: #999;
    border-right: 5px solid #777;
    flex-shrink: 0;
}

.bar-shaft {
    width: 20px;
    height: 20px;
    background: #bbb;
    flex-shrink: 0;
}

.collar {
    width: 10px;
    height: 30px;
    background: #555; /* Dark grey collar */
    margin-left: 2px;
    border-radius: 2px;
    flex-shrink: 0;
}

.plates-container {
    display: flex;
    align-items: center;
    margin-left: 2px;
}

.plate {
    height: 100px;
    width: 15px;
    background: #333;
    margin-right: 2px;
    border-radius: 2px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-weight: bold;
}

/* IWF / IPF Color Coding (KG) */
.plate-kg-25 { height: 125px; background: #d63031; border-color: #b71c1c; } /* Red */
.plate-kg-20 { height: 115px; background: #0984e3; border-color: #0056b3; } /* Blue */
.plate-kg-15 { height: 105px; background: #fdcb6e; color: #333; border-color: #e1b12c; text-shadow: none; } /* Yellow */
.plate-kg-10 { height: 90px; background: #00b894; border-color: #008a6e; } /* Green */
.plate-kg-5 { height: 70px; background: #fff; color: #333; border: 1px solid #ccc; text-shadow: none; } /* White */
.plate-kg-2-5 { height: 60px; background: #636e72; border-color: #2d3436; } /* Black */
.plate-kg-1-25 { height: 50px; background: #b2bec3; color: #333; border-color: #888; text-shadow: none; } /* Silver */
.plate-kg-1 { height: 45px; background: #dfe6e9; color: #333; border-color: #ccc; text-shadow: none; } /* Chrome */
.plate-kg-0-5 { height: 40px; background: #dfe6e9; color: #333; border-color: #ccc; text-shadow: none; } /* Chrome */

/* Imperial (LBS) Colors */
.plate-lb-55 { height: 125px; background: #d63031; } /* Red */
.plate-lb-45 { height: 115px; background: #0984e3; } /* Blue */
.plate-lb-35 { height: 105px; background: #fdcb6e; color: #333; text-shadow: none; } /* Yellow */
.plate-lb-25 { height: 90px; background: #00b894; } /* Green */
.plate-lb-10 { height: 70px; background: #fff; color: #333; border: 1px solid #ccc; text-shadow: none; } /* White */
.plate-lb-5 { height: 60px; background: #636e72; } /* Black */
.plate-lb-2-5 { height: 50px; background: #b2bec3; color: #333; text-shadow: none; } /* Silver */

/* Percentage Grid */
.pl-pct-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.pl-pct-item {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    border-radius: 4px;
}
.pl-pct-label {
    display: block;
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 2px;
}
.pl-pct-val {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
}

/* 1RM Styles */
.rm-main-display {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}
.rm-big-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #0073aa;
    line-height: 1;
    margin: 10px 0;
}
.rm-subtitle {
    color: #777;
    font-size: 0.9rem;
    margin: 0;
}
.rm-grid-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.rm-col {
    flex: 1;
}
.rm-col h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #23282d;
    text-align: center;
}
.eg-compact-table th, .eg-compact-table td {
    padding: 6px;
    font-size: 0.9rem;
    text-align: center;
}

/* Table */
.eg-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #fff;
}
.eg-table th, .eg-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    color: #333;
}
.eg-table th {
    background-color: #e5e5e5;
    font-weight: bold;
    color: #000;
}

/* Timer */
.timer-display {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    font-variant-numeric: tabular-nums;
    color: #333 !important;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Tracker Stats */
.eg-stats {
    margin-top: 20px;
    border-top: 1px solid #ccc;
    padding-top: 10px;
    color: #333 !important;
}
.vt-log-item {
    font-size: 0.9rem;
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
    color: #333 !important;
}
.vt-total {
    font-weight: bold;
    margin-top: 10px;
    font-size: 1.1rem;
    color: #000 !important;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .rm-grid-container {
        flex-direction: column;
    }
    .eg-row {
        flex-direction: column;
        gap: 5px;
    }
}

/* =========================================
   Warm-Up Generator Styles (Professional)
   ========================================= */
.wu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.wu-header h4 {
    margin: 0;
    color: #23282d;
}

.wu-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wu-set-row {
    display: flex;
    align-items: flex-start; /* Align top for multi-line plate text */
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.wu-set-row:last-child {
    border-bottom: none;
}

.wu-set-row:hover {
    background: #f9f9f9;
}

.wu-work-set {
    background: #e3f2fd; /* Light blue highlight */
    border-left: 4px solid #2196F3;
    padding-left: 6px; /* Adjust for border */
}

.wu-set-row.completed {
    opacity: 0.5;
    text-decoration: line-through;
    background: #f0f0f0;
}

/* Custom Checkbox */
.wu-checkbox-container {
    position: relative;
    cursor: pointer;
    font-size: 22px;
    user-select: none;
    padding-left: 30px;
    margin-right: 10px;
    height: 25px;
}

.wu-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 4px;
}

.wu-checkbox-container:hover input ~ .checkmark {
    background-color: #f0f0f0;
}

.wu-checkbox-container input:checked ~ .checkmark {
    background-color: #0073aa;
    border-color: #0073aa;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.wu-checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.wu-checkbox-container .checkmark:after {
    left: 8px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Set Info Text */
.wu-set-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wu-set-main {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 4px;
}

.wu-plate-detail {
    font-size: 0.85rem;
    color: #666;
    font-family: monospace; /* Easier to read numbers */
    background: rgba(0,0,0,0.03);
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

/* Sticky Timer */
.wu-sticky-timer {
    position: sticky;
    top: 10px; /* Stick to top of container/viewport if possible */
    z-index: 100;
    background: #23282d;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 1.1rem;
    animation: slideDown 0.3s ease-out;
}

.eg-btn-xs {
    padding: 4px 8px;
    font-size: 0.8rem;
    background: #555;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Description Box */
.eg-tool-description {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
}
.eg-tool-description h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #333;
}
