/* Dark Mode Overrides */

body.dark-mode {
    --background: #1a1a1a;
    --card: #2d2d2d;
    --text: #e0e0e0;
    --text-light: #b0b0b0;
    --text-muted: #808080;
    --border: #404040;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --date-icon-filter: invert(1);
}

body.dark-mode .header {
    background: linear-gradient(135deg, #1d4a2d 0%, #2d5a3d 100%);
}

body.dark-mode .modal-content {
    background: var(--card);
}

body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea {
    background: #3d3d3d;
    border-color: var(--border);
    color: var(--text);
}

body.dark-mode .breed-dropdown {
    background: #3d3d3d;
}

body.dark-mode .breed-option:hover {
    background: #4d4d4d;
}

body.dark-mode .toast {
    background: #e0e0e0;
    color: #1a1a1a;
}

body.dark-mode .card {
    background: var(--card);
}

body.dark-mode .result-box {
    background: #3d3d3d;
}

body.dark-mode .record-item,
body.dark-mode .milestone-item {
    background: #3d3d3d;
}

body.dark-mode .milestone-item.completed {
    background: #2d4a2d;
}

body.dark-mode .symptom-tag {
    background: #3d3d3d;
}

body.dark-mode .dog-card {
    background: var(--card);
}
body.dark-mode .dog-card.active {
    background: #2d5a3d !important;
}
body.dark-mode .dog-card.active .dog-info h3,
body.dark-mode .dog-card.active .dog-info p {
    color: white !important;
}

body.dark-mode .active-dog-banner {
    background: linear-gradient(135deg, #1d4a2d 0%, #2d5a3d 100%);
}

body.dark-mode .add-dog-btn {
    background: var(--card);
}

body.dark-mode .tier-card {
    background: #3d3d3d;
}

body.dark-mode .food-item.safe {
    background: #1b3d1f !important;
}

body.dark-mode .food-item.toxic.severity-high {
    background: #3d1f1f !important;
}

body.dark-mode .food-item.toxic.severity-medium {
    background: #3d2e1f !important;
}

body.dark-mode .food-item.toxic.severity-low {
    background: #3d351f !important;
}

body.dark-mode .settings-item {
    border-color: var(--border);
}

/* Dark mode: sex buttons (unselected) need visible text */
body.dark-mode .sex-btn:not(.active) {
    color: var(--text);
}

/* Dark mode: breed input/select visibility */
body.dark-mode .breed-input,
body.dark-mode input[type="text"],
body.dark-mode input[type="number"],
body.dark-mode input[type="date"],
body.dark-mode select {
    background: #3d3d3d;
    color: #f0f0f0;
    border-color: var(--border);
}

/* Dark mode: improve general text clarity */
body.dark-mode {
    --text: #f0f0f0;
    --text-light: #c0c0c0;
    --text-muted: #909090;
}

/* Dark mode: toxic food text - brighter colors for readability */
body.dark-mode .food-item.toxic .food-name,
body.dark-mode .food-item.toxic strong {
    color: #ff8a8a !important;
}
body.dark-mode .food-item.toxic.severity-high .food-name,
body.dark-mode .food-item.toxic.severity-high strong {
    color: #ff8a8a !important;
}
body.dark-mode .food-item.toxic.severity-medium .food-name,
body.dark-mode .food-item.toxic.severity-medium strong {
    color: #ffbb77 !important;
}
body.dark-mode .food-item.toxic.severity-high span {
    color: #ff8a8a !important;
}
body.dark-mode .food-item.toxic.severity-medium span {
    color: #ffbb77 !important;
}

/* Dark mode: dog selector active item - dark green with white text */
body.dark-mode .dog-selector-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
body.dark-mode .dog-selector-item.active .dog-selector-info h4,
body.dark-mode .dog-selector-item.active .dog-selector-info p {
    color: white;
}

/* Dark mode: "Add Your Dog" banner - green with white text */
body.dark-mode .no-dog-banner {
    background: #2d5a3d !important;
    border-color: #3d7a52 !important;
    border-style: solid !important;
}
body.dark-mode .no-dog-banner .no-dog-icon {
    filter: brightness(1.2);
}
body.dark-mode .no-dog-title {
    color: white !important;
}
body.dark-mode .no-dog-text {
    color: rgba(255,255,255,0.8) !important;
}

/* Dark mode: input fields should not turn white when populated/autofilled */
body.dark-mode input:-webkit-autofill,
body.dark-mode input:-webkit-autofill:hover,
body.dark-mode input:-webkit-autofill:focus,
body.dark-mode textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #3d3d3d inset !important;
    -webkit-text-fill-color: #f0f0f0 !important;
    caret-color: #f0f0f0;
}
body.dark-mode input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
body.dark-mode textarea,
body.dark-mode select {
    background-color: #3d3d3d !important;
    color: #f0f0f0 !important;
    border-color: var(--border) !important;
}

/* Dark mode: fav cards */
body.dark-mode .fav-card {
    background: #3d3d3d;
}

/* Dark mode: daily tip banner */
body.dark-mode .daily-tip-banner {
    background: linear-gradient(135deg, #3d3520 0%, #2d2a1a 100%);
    border-bottom-color: #4d4530;
}
