/* Diced Macros - Frontend Hover Popup */
.diced-macro-popup {
    position: fixed;
    z-index: 99999;
    background: #ffffff;
    border: 2px solid #1B4332;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    pointer-events: none;
    min-width: 240px;
    font-family: 'Outfit', -apple-system, sans-serif;
    transition: opacity 0.15s ease;
}

.diced-macro-popup-title {
    font-size: 15px;
    font-weight: 800;
    color: #1B4332;
    text-align: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #D8F3DC;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.diced-macro-popup-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    text-align: center;
}

.diced-macro-popup-item {
    padding: 8px 4px;
    border-radius: 8px;
}

.diced-macro-cal { background: #FEF3C7; }
.diced-macro-protein { background: #DBEAFE; }
.diced-macro-carbs { background: #D8F3DC; }
.diced-macro-fat { background: #FCE7F3; }

.diced-macro-popup-num {
    display: block;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2px;
}

.diced-macro-cal .diced-macro-popup-num { color: #92400E; }
.diced-macro-protein .diced-macro-popup-num { color: #1E40AF; }
.diced-macro-carbs .diced-macro-popup-num { color: #1B4332; }
.diced-macro-fat .diced-macro-popup-num { color: #9D174D; }

.diced-macro-popup-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
}

.diced-macro-popup-note {
    text-align: center;
    font-size: 10px;
    color: #9CA3AF;
    margin-top: 10px;
    font-style: italic;
}

/* Trigger area on meal cards */
.diced-menu-card {
    position: relative;
}

.diced-macro-trigger {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(27, 67, 50, 0.85);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
    transition: background 0.2s;
    pointer-events: auto;
}

.diced-macro-trigger:hover {
    background: rgba(27, 67, 50, 1);
}

/* Modal colour classes with !important to beat theme resets */
#diced-macro-modal * { box-sizing: border-box !important; font-family: 'Outfit', -apple-system, sans-serif !important; }
.dmp-box  { background: #ffffff !important; border: 2px solid #1B4332 !important; }
.dmp-cal  { background: #FEF3C7 !important; }
.dmp-pro  { background: #DBEAFE !important; }
.dmp-carb { background: #D8F3DC !important; }
.dmp-fat  { background: #FCE7F3 !important; }
.dmp-cal  span:first-child { color: #92400E !important; }
.dmp-pro  span:first-child { color: #1E40AF !important; }
.dmp-carb span:first-child { color: #1B4332 !important; }
.dmp-fat  span:first-child { color: #9D174D !important; }

/* Trigger button — larger touch target */
.diced-macro-trigger {
    min-height: 36px !important;
    padding: 9px 12px !important;
    border-radius: 0 0 0 10px !important;
    top: 0 !important;
    right: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    font-family: 'Outfit', -apple-system, sans-serif !important;
}
@media (max-width: 768px) {
    .diced-macro-trigger { min-height: 40px !important; padding: 11px 13px !important; }
}
