/* General Reset and Font */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .infographic {
    background-color: #2c2c2c;
}

body.dark-mode .app-header {
    background: #2c2c2c;
    color: #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body.dark-mode a {
    color: #a0a0a0;
}

body.dark-mode a:hover {
    color: #ffffff;
}

body.dark-mode .intro {
    background-color: #252525;
    border-bottom: 1px solid #444;
}

body.dark-mode .section {
    border-bottom: 1px solid #444;
}

body.dark-mode h2 {
    color: #e0e0e0;
}

body.dark-mode h2:before {
    background-color: #5a9cff;
}

body.dark-mode .region-card {
    background-color: #333;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

body.dark-mode .tip-range {
    background-color: #1e3a8a;
    color: #93c5fd;
}

body.dark-mode .tip-note {
    color: #b0b0b0;
}

body.dark-mode .calculator {
    background-color: #1e3a8a;
}

body.dark-mode .calc-title {
    color: #93c5fd;
}

body.dark-mode .calc-step {
    background-color: #333;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

body.dark-mode .step-number {
    background-color: #5a9cff;
}

body.dark-mode .step-title {
    color: #e0e0e0;
}

body.dark-mode .footer {
    color: #a0a0a0;
}

/* Infographic Container */
.infographic {
    max-width: 900px;
    margin: 16px auto;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Header */
header, .app-header {
    background: #fff;
    color: #333;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Define flex and items-center for compatibility with Tailwind classes */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

h1 {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
}

header .text-primary {
    color: #1f2937;
}

header .container .flex.items-center span.bg-blue-100 {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 9999px;
    margin-left: 8px;
    opacity: 1;
}

header a {
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    margin-right: 16px;
}

header a:hover {
    color: #111827;
}

header .flex.items-center > span {
    color: #4b5563;
    font-size: 14px;
    margin-right: 8px;
}

header button#darkModeToggle {
    width: 48px;
    height: 24px;
    border-radius: 9999px;
    background-color: #d1d5db;
    display: flex;
    align-items: center;
    padding: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

header button#darkModeToggle div#darkModeIndicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #fff;
    transition: transform 0.3s ease-in-out, background-color 0.3s;
}

body.dark-mode button#darkModeToggle {
    background-color: #4b5563;
}

body.dark-mode button#darkModeIndicator {
    transform: translateX(24px);
    background-color: #93c5fd;
}

/* Mobile and Desktop View Separation */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    .desktop-only {
        display: none;
    }
}

/* Intro Section */
.intro {
    padding: 30px;
    border-bottom: 1px solid #eaeaea;
}

.intro p {
    margin-bottom: 20px;
}

/* Generic Section */
.section {
    padding: 30px;
    border-bottom: 1px solid #eaeaea;
}

/* Section Heading */
h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    position: relative;
    padding-left: 20px;
}

h2:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-color: #3a7bd5;
    border-radius: 50%;
}

/* Map Styling */
.map-container {
    margin: 0px 0;
    position: relative;
    text-align: center;
}

#map {
    width: 100%;
    max-width: 840px;
    height: 450px;
    position: relative;
    border-radius: 12px;
    background-color: #ffffff;
    margin: 0 auto;
}

#map p {
    display: block;
    text-align: center;
    color: red;
}

#map svg {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* SVG Map Specific Styles */
.svgMap-map-wrapper .svgMap-map path:not([data-id]) {
    fill: #FFFFFF !important;
}

.svgMap-tooltip {
    text-align: center;
    background-color: white;
    border: 1px solid #eaeaea;
    padding: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    font-family: 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
}

.svgMap-tooltip img.flag {
    display: block;
    margin: auto;
    width: auto;
    height: 50px;
    padding: 2px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    object-fit: contain;
    flex-shrink: 50;
}

.svgMap-tooltip .content {
    display: flex;
    flex-direction: column;
    max-width: 200px;
    justify-content: center;
}

.svgMap-tooltip .content > div {
    margin-bottom: 4px;
    line-height: 1.2;
    align-items: center;
    text-align: center;
}

.svgMap-tooltip .content > div:first-child {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
    align-items: center;
    text-align: center;
}

.svgMap-tooltip .content > div:not(:first-child) {
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    color: #666;
    align-items: center;
    text-align: center;
}

.svgMap-tooltip .content > div:not(:first-child) > span:first-child {
    font-weight: bold;
    color: #1565c0;
    align-items: center;
    text-align: center;
}

.svgMap-tooltip .content > div:last-child {
    margin-bottom: 0;
    align-items: center;
    text-align: center; 
}

/* Regional Guidelines */
.regions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.region-card {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.region-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.region-icon {
    margin-right: 10px;
    font-size: 24px;
}

.tip-range {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
}

.tip-note {
    font-size: 14px;
    color: #666;
}

/* Calculator Section */
.calculator {
    background-color: #f0f7ff;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

.calc-title {
    text-align: center;
    margin-bottom: 20px;
    color: #1565c0;
}

.calc-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 15px;
}

.calc-step {
    flex: 1 1 200px;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.07);
    text-align: center;
}

.step-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #3a7bd5;
    color: white;
    border-radius: 50%;
    margin-bottom: 15px;
}

.step-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Footer */
.footer {
    padding: 20px;
    text-align: center;
    color: #777;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 12px 16px;
    }
    h1 {
        font-size: 20px;
    }
    .section {
        padding: 20px;
    }
    .regions {
        grid-template-columns: 1fr;
    }
    .calc-steps {
        flex-direction: column;
    }
    #map {
        height: 300px;
    }
}