
:root { --bg-color: #FDFBF7; --text-color: #3E2723; --accent-color: #D4AF37; --card-bg: #ffffff; --success-color: #689F38; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Rubik', sans-serif; background-color: var(--bg-color); color: var(--text-color); line-height: 1.6; display: flex; flex-direction: column; align-items: center; min-height: 100vh; padding: 20px; padding-top: 60px; direction: rtl;}
a { text-decoration: none; color: inherit; }

.top-right-home { position: fixed; top: 15px; right: 20px; background: #fff; color: var(--accent-color); border: 1px solid var(--accent-color); padding: 8px 15px; border-radius: 20px; font-size: 0.9rem; box-shadow: 0 2px 10px rgba(0,0,0,0.05); z-index: 1000; font-weight: 500; transition: all 0.3s ease; }
.top-right-home:hover { background: #fdfaf0; transform: translateY(-2px); }

.top-right-add { position: fixed; top: 15px; right: 20px; background: #fff; color: #4CAF50; border: 1px solid #4CAF50; padding: 8px 15px; border-radius: 20px; font-size: 0.9rem; box-shadow: 0 2px 10px rgba(0,0,0,0.05); z-index: 1000; font-weight: 500; cursor: pointer; transition: all 0.3s ease; }
.top-right-add:hover { background: #f1f8e9; transform: translateY(-2px); }

.main-header { text-align: center; margin-top: 2vh; margin-bottom: 2vh; display:none; }
.main-header h1 { font-size: 3rem; font-weight: 500; letter-spacing: 3px; color: var(--text-color); }
.main-header .subtitle { font-weight: 300; font-size: 1.1rem; color: #6d4c41; }

.container { background: transparent; padding: 0; max-width: 800px; width: 100%; text-align: center; margin-bottom: 2rem; }
.container h2 { font-weight: 400; margin-bottom: 1.5rem; }
.input-group { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; text-align: right; }
.input-group label { font-size: 0.95rem; color: #6d4c41; font-weight: 500; }
input[type="date"], input[type="text"], input[type="email"], input[type="password"], input[type="time"], input[type="datetime-local"], input[type="number"], select { font-family: 'Rubik', sans-serif; padding: 12px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 1rem; color: var(--text-color); background-color: #fff; width: 100%; }
input:focus, select:focus { outline: none; border-color: var(--accent-color); }

button { font-family: 'Rubik', sans-serif; background-color: var(--accent-color); color: #fff; border: none; padding: 12px 24px; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: background-color 0.3s ease; width: 100%; }
button:hover { background-color: #b8972e; }
.btn-secondary { background-color: transparent; color: var(--accent-color); border: 1px solid var(--accent-color); margin-bottom: 1.5rem; }
.btn-secondary:hover { background-color: rgba(212, 175, 55, 0.1); }
.hidden { display: none !important; }

/* Dashboard Styling */
.profile-header {
    background-color: transparent;
    padding: 1rem 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
}
.profile-greeting-box { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    text-align: right; 
    gap: 0;
}
.profile-greeting { 
    font-size: 1.5rem; 
    font-weight: 500; 
    margin: 0 0 2px 0; 
    color: #275276;
    line-height: 1;
}
.profile-date { 
    font-size: 0.8rem; 
    color: #78909c; 
    margin: 0;
    line-height: 1;
}

.child-tabs-container { display: flex; gap: 10px; margin-bottom: 1.5rem; justify-content: flex-start; overflow-x: auto; padding-bottom: 5px;}
.child-tab { padding: 6px 18px; border: 1px solid var(--accent-color); background: transparent; color: var(--accent-color); border-radius: 20px; cursor: pointer; font-family: 'Rubik'; font-size: 0.95rem; white-space: nowrap; width:auto; font-weight:400;}
.child-tab.active { background: var(--accent-color); color: #fff; font-weight:500;}

.logout-btn-container { text-align: center; margin-top: 2.5rem; border-top: 1px dashed #e0e0e0; padding-top: 2rem;}
.logout-btn-bottom { 
    background-color: transparent; 
    color: #c62828; 
    border: 1px solid #c62828; 
    padding: 8px 30px; 
    border-radius: 30px; 
    font-size: 0.95rem; 
    font-weight: 400; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    width: auto;
}
.logout-btn-bottom:hover { background-color: #ffebee; }

.baby-card { 
    background: white; 
    border: 1px solid #e0e0e0; 
    padding: 1.5rem; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 2rem; 
    justify-content: space-between;
}
.baby-info { text-align: right; }
.baby-name { font-size: 1.2rem; font-weight: 500; color: #333; margin-bottom: 3px;}
.baby-age { font-size: 0.85rem; color: #666; }
.baby-icon { display: flex; align-items: center; justify-content: center;}

.timeline { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; border-bottom: 1px solid #e0e0e0; padding-bottom: 1rem; }
.month-btn { background-color: transparent; color: #9e9e9e; border: 1px solid transparent; padding: 6px 12px; font-weight: 400; width: auto !important; transition: all 0.3s; font-size:0.9rem;}
.month-btn:hover { color: #666; }
.month-btn.active { color: var(--accent-color); border: 1px solid var(--accent-color); border-radius: 8px;}

.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.tool-card { background: white; padding: 1.5rem; border-radius: 12px; border: 1px solid #e0e0e0; cursor: pointer; transition: all 0.3s ease; display: block; text-align:center; text-decoration:none;}
.tool-card:hover { border-color: var(--accent-color); transform: translateY(-2px); }
.tool-card h4 { font-weight: 500; margin-bottom: 0.5rem; color: var(--text-color); font-size:1.1rem;}
.tool-card p { font-weight: 300; font-size: 0.85rem; color: #9e9e9e; }

.share-btn-wrapper { margin-top: 2rem; margin-bottom: 1rem; text-align: center; }
.share-btn-pill {
    background-color: transparent; color: #D4AF37; border: 1px dashed #D4AF37;
    padding: 8px 25px; border-radius: 30px; font-size: 0.95rem; font-weight: 400;
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px; width: auto;
}
.share-btn-pill:hover { background-color: #fffdf5; }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; z-index: 1000; direction:rtl;}
.modal-content { background: white; padding: 2rem; border-radius: 12px; width: 90%; max-width: 400px; text-align: right; max-height: 90vh; overflow-y: auto;}
.modal-buttons { display: flex; gap: 10px; margin-top:15px; }
.modal-buttons button { width: 100%; flex: 1; }
.btn-save { background: #D4AF37; color: white; }
.btn-cancel { background: #f0f0f0; color: #333; }

/* FOODS DIARY STYLES */
.guidelines-box { background-color: #F8F5F2; border-radius: 12px; padding: 1.5rem; margin-bottom: 2rem; color: #3E2723; text-align: right; }
.guidelines-box h3 { font-weight: 500; margin-bottom: 1rem; color: #6d4c41; }
.guidelines-box ul { padding-right: 1.5rem; }
.guidelines-box li { margin-bottom: 0.5rem; font-size: 0.95rem; }
.search-container { margin-bottom: 2rem; width: 100%; display: flex; justify-content: center;}
.search-input { width: 100%; max-width: 600px; padding: 12px 20px; border-radius: 25px; border: 1px solid #D4AF37; font-size: 1rem; font-family: 'Rubik'; box-shadow: 0 2px 10px rgba(0,0,0,0.05); text-align: right;}
.filters-container { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 2rem; justify-content: center;}
.filter-btn { background: transparent; border: 1px solid #D4AF37; color: #D4AF37; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-family: 'Rubik', sans-serif; font-size: 0.9rem; transition: all 0.2s; width: auto !important; }
.filter-btn:hover { background: rgba(212, 175, 55, 0.1); }
.filter-btn.active { background: #D4AF37; color: white; }
.add-custom-btn { background: transparent; border: 1px dashed #6d4c41; color: #6d4c41; padding: 12px 16px; border-radius: 20px; cursor: pointer; font-family: 'Rubik', sans-serif; font-size: 0.9rem; width: 100%; margin-bottom: 2rem; transition: background 0.3s; }
.add-custom-btn:hover { background: #f0f0f0; }
.food-list { display: flex; flex-direction: column; gap: 1rem; text-align: right; }
.food-card { display: flex; flex-direction: row; justify-content: space-between; align-items: flex-start; padding: 15px; border-radius: 12px; border: 1px solid #e0e0e0; background: #fff; position: relative; min-height: 100px; }
.food-card.allergen-bg { background-color: #fff5f5; border-color: #ffcdd2;}
.food-card.older-bg { background-color: #fff8e1; border-color: #ffecb3;}
.counter-box-wrapper { width: 90px; flex-shrink: 0; margin-left: 15px;}
.counter-box { background: #9e9e9e; color: white; border-radius: 8px; width: 100%; min-height: 90px; display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; transition: transform 0.1s; padding: 10px 0;}
.counter-box.tasted { background: var(--success-color); }
.counter-box:active { transform: scale(0.95); }
.counter-box .num { font-size: 2rem; font-weight: 500; line-height: 1; }
.counter-box .text { font-size: 0.85rem; margin-top:2px;}
.counter-box .add-text { font-size: 0.75rem; text-decoration: underline; margin-top:2px; color: white;}
.food-info { flex-grow: 1; text-align: right; display: flex; flex-direction: column; justify-content: flex-start; padding-top: 5px;}
.food-title { font-size: 1.3rem; font-weight: 500; color: #3E2723; display: flex; align-items: center; gap: 8px; justify-content: flex-start; margin-bottom: 5px; direction: rtl;}
.food-emoji { font-size: 1.5rem; margin-right: 5px;}
.food-desc { font-size: 0.9rem; color: #6d4c41; margin-bottom: 8px; padding-left: 40px; }
.badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 5px; justify-content: flex-start; direction: rtl;}
.badge { font-size: 0.75rem; padding: 3px 8px; border-radius: 12px; }
.badge-cat { background: #f0f0f0; color: #666; }
.badge-allergen { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; font-weight: 500; }
.badge-age { background: #fff3e0; color: #ef6c00; border: 1px solid #ffe0b2; }
.history-section { font-size: 0.85rem; color: #9e9e9e; margin-top: 10px; display:flex; justify-content:flex-start; align-items:center; direction:rtl;}
.history-btn { background: none; border: none; color: #9e9e9e; text-decoration: underline; padding: 0; font-size: 0.85rem; cursor: pointer; width: auto !important; margin-right: 8px; }
.heart-container { position: absolute; top: 15px; left: 15px; }
.heart-btn { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: #e0e0e0; transition: color 0.3s; width: auto !important; padding: 0; }
.heart-btn.loved { color: #FF69B4; }

/* Pumping & Alcohol */
.milk-list { text-align: right; margin-top: 1.5rem; }
.milk-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 15px 10px; border-bottom: 1px solid #e0e0e0; transition: all 0.3s ease;}
.milk-item.used { opacity: 0.45; background-color: #fcfcfc;}
.milk-item.used .milk-main-text { text-decoration: line-through; }
.checkbox-round { width: 24px; height: 24px; cursor: pointer; margin-top: 5px;}

.highlight-box { background: #fdfaf0; border: 1px solid var(--accent-color); padding: 15px; border-radius: 8px; margin-top: 15px; text-align:right;}

.drinks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-top: 0.5rem; }
.drink-card { border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px 5px; cursor: pointer; background: white; text-align: center; transition: all 0.2s; }
.drink-card input[type="radio"] { display: none; }
.drink-content { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* Updated Alcohol Emoji styling */
.drink-content .emoji { 
    font-size: 2.8rem; 
    text-shadow: 
        -1px -1px 0 #fff, 
         1px -1px 0 #fff, 
        -1px  1px 0 #fff, 
         1px  1px 0 #fff,
         0px  3px 6px rgba(0,0,0,0.15);
    margin-bottom: 5px;
}
.drink-content .drink-name { font-size: 1.15rem; color: #3E2723; font-weight: 500;}
.drink-content .drink-name small { font-size: 0.95rem; color: #6d4c41; font-weight:300;}
.drink-card:has(input[type="radio"]:checked) { border-color: var(--accent-color); background-color: rgba(212, 175, 55, 0.08); }
.drink-card:has(input[type="radio"]:checked) .drink-name { color: var(--accent-color); }

.result-box { margin-top: 2rem; padding: 1.5rem; background: #fdfaf0; border-radius: 8px; border: 1px solid var(--accent-color); color: var(--text-color); font-size: 1.1rem; animation: fadeIn 0.5s; }
.result-box .time-highlight { font-size: 2rem; display: block; margin-top: 0.5rem; color: var(--accent-color); font-weight: 500; text-align:center;}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Percentiles Charts */
.history-table { width: 100%; border-collapse: collapse; margin-top: 1rem; text-align: center; font-size: 0.9rem; direction: rtl;}
.history-table th { background: #F8F5F2; padding: 10px; border: 1px solid #e0e0e0; color: #3E2723; font-weight: 500; }
.history-table td { padding: 10px; border: 1px solid #e0e0e0; color: #6d4c41; }
.chart-container { margin-top: 1.5rem; height: 350px; width: 100%; position: relative; background: white; border: 1px solid #e0e0e0; border-radius: 12px; padding: 10px;}
.chart-tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 1rem; direction:rtl;}
.chart-tab-btn { background: transparent; border: 1px solid #4CAF50; color: #4CAF50; border-radius: 20px; padding: 5px 15px; font-family: 'Rubik'; cursor:pointer; width:auto!important;}
.chart-tab-btn.active { background: #4CAF50; color: white; }
.del-btn { background: #ffebee; color: #c62828; border: none; border-radius: 4px; cursor: pointer; padding: 5px 10px; width: auto!important; font-size:0.8rem;}

/* Paced Feeding Diagram Area */
.diagram-container { position: relative; width: 100%; display: flex; flex-direction: column; justify-content:center; align-items:center; margin-top: 15px; }
.diagram-image-wrapper { position:relative; display:inline-block; width:100%; max-width:500px; background-color: #fff;}
.diagram-image-wrapper img { width: 100%; border-radius:12px; display:block;}
.hotspot { position: absolute; width: 32px; height: 32px; background: rgba(212, 175, 55, 0.95); color: white; border-radius: 50%; display: flex; justify-content:center; align-items:center; cursor:pointer; font-weight: bold; box-shadow: 0 0 0 rgba(212, 175, 55, 0.5); animation: pulse 2s infinite; z-index: 10; font-family: 'Rubik'; font-size: 1.1rem; border:2px solid #fff;}
.hotspot-info { position: absolute; bottom: 40px; right: 50%; transform: translateX(50%); background: #3E2723; color: #fff; padding: 12px; border-radius: 8px; width: 240px; font-size: 0.9rem; text-align: center; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.2);}
.hotspot:hover .hotspot-info, .hotspot:active .hotspot-info { opacity: 1; visibility: visible; bottom: 45px;}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); } 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); } }

.drink-content .emoji svg { transition: all 0.2s; stroke: #6d4c41; }
.drink-card:has(input[type="radio"]:checked) .drink-content .emoji svg { stroke: var(--accent-color); }
