* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: light only;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    min-height: 100vh;
    height: 100vh;
    padding: 1vh 1vw;
    overflow: hidden;
    position: relative;
    color-scheme: light only;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.main-container {
    display: flex;
    gap: 1vw;
    max-width: 100%;
    height: 98vh;
    margin: 0 auto;
}

.left-panel {
    flex: 0 0 min(450px, 35vw);
    display: flex;
    flex-direction: column;
    overflow: visible;
    max-height: 100%;
}

.right-panel {
    flex: 1;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 100%;
}

.header-section {
    display: flex;
    align-items: center;
    gap: 1vw;
    margin-bottom: 1vh;
    flex-shrink: 0;
}

.logo {
    width: clamp(60px, 10vw, 100px);
    height: clamp(60px, 10vw, 100px);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    flex: 1;
}

h1 {
    color: white;
    text-align: left;
    margin: 0;
    font-size: clamp(1rem, 1.5vw, 1.5em);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    line-height: 1.2;
}

.date-display {
    color: white;
    font-size: clamp(0.7rem, 1.2vw, 0.85em);
    font-weight: normal;
    display: block;
    margin-top: 0.5vh;
    opacity: 0.95;
    line-height: 1.3;
}

.loading {
    text-align: center;
    color: white;
    font-size: clamp(1rem, 1.2vw, 1.2em);
    padding: 2vh;
}

.error {
    background-color: #ff6b6b;
    color: white;
    padding: 1.5vh 1vw;
    border-radius: 10px;
    text-align: center;
    margin: 1vh 0;
    font-size: clamp(0.8rem, 1vw, 1em);
}

.pharmacy-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    padding-right: 2vw;
    padding-left: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.pharmacy-list::-webkit-scrollbar {
    width: 6px;
}

.pharmacy-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.pharmacy-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

.pharmacy-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.pharmacy-item {
    background-color: white !important;
    color: #1f2937 !important;
    margin-bottom: 1vh;
    margin-left: 5px;
    margin-right: 5px;
    margin-top: 5px;
    padding: clamp(10px, 1.5vh, 20px) clamp(10px, 1vw, 20px);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    cursor: pointer;
    position: relative;
    forced-color-adjust: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.pharmacy-item:first-child {
    margin-top: 5px;
}

.pharmacy-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background-color: #f8f9ff;
}

.pharmacy-item.active {
    background-color: #dc2626 !important;
    color: white !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2), 0 0 0 3px white;
    transform: scale(1.05);
    padding: clamp(12px, 1.8vh, 24px) clamp(12px, 1.2vw, 24px);
    forced-color-adjust: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.pharmacy-item.active::after {
    content: '';
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 18px solid white;
    filter: drop-shadow(2px 0 4px rgba(0,0,0,0.25));
    z-index: 10;
}

.pharmacy-item.active .pharmacy-name {
    color: white !important;
}

.pharmacy-item.active .pharmacy-address,
.pharmacy-item.active .pharmacy-phone {
    color: rgba(255,255,255,0.9) !important;
}

.pharmacy-name {
    font-size: clamp(1rem, 1.2vw, 1.2em);
    font-weight: bold;
    color: #dc2626;
    margin-bottom: 0.5vh;
}

.pharmacy-address {
    color: #555;
    line-height: 1.4;
    font-size: clamp(0.8rem, 0.95vw, 0.95em);
}

.pharmacy-phone {
    color: #991b1b;
    margin-top: 0.5vh;
    font-weight: 500;
    font-size: clamp(0.75rem, 0.9vw, 0.9em);
}

.info-box {
    background-color: rgba(255,255,255,0.9) !important;
    padding: clamp(8px, 1.5vh, 15px);
    border-radius: 10px;
    margin-bottom: 1vh;
    text-align: left;
    color: #1f2937 !important;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5vw;
    flex-shrink: 0;
    font-size: clamp(0.75rem, 0.9vw, 0.95em);
    forced-color-adjust: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    font-size: clamp(0.75rem, 0.9vw, 0.95em);
    color: #1f2937 !important;
    forced-color-adjust: none;
}

.weather-icon {
    width: clamp(24px, 3vw, 32px);
    height: clamp(24px, 3vw, 32px);
}

.weather-temp {
    font-weight: bold;
    color: #dc2626 !important;
    forced-color-adjust: none;
}

.pharmacy-contact {
    padding: clamp(12px, 2vh, 20px) clamp(10px, 1.5vw, 20px);
    margin-top: 1vh;
    text-align: center;
    flex-shrink: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.7);
    padding-top: clamp(15px, 2.5vh, 25px);
}

.contact-name {
    font-size: clamp(1.3rem, 1.8vw, 1.8em);
    font-weight: bold;
    color: white !important;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    forced-color-adjust: none;
}

.contact-phone {
    font-size: clamp(1rem, 1.2vw, 1.2em);
    font-weight: 600;
    color: white !important;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    forced-color-adjust: none;
}

#mapContainer {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.map-placeholder {
    padding: 40px;
    text-align: center;
    font-size: 1.1em;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

#qrCode {
    position: absolute;
    bottom: 1vh;
    right: 1vw;
    background-color: white;
    padding: clamp(8px, 1vh, 12px);
    border-radius: 8px;
    border: 2px solid #dc2626;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1001;
    display: none;
    text-align: center;
}

#qrCode canvas,
#qrCode img {
    display: block;
    margin: 0 auto;
    width: clamp(80px, 10vw, 128px) !important;
    height: clamp(80px, 10vw, 128px) !important;
}

.qr-label {
    font-size: clamp(8px, 1vw, 12px);
    font-weight: bold;
    color: #dc2626;
    margin-top: 0.5vh;
    text-align: center;
}
