:root {
    color-scheme: light;
    color: #162725;
    background: #eef3ef;
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }

.widget {
    width: min(100%, 640px);
    margin: 0 auto;
    padding: clamp(12px, 4vw, 24px);
}

.widget-header {
    padding: clamp(16px, 5vw, 24px);
    border-radius: 18px 18px 6px 6px;
    color: #fff;
    background: #173d35;
}

h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.5rem, 6vw, 2rem); line-height: 1.15; }
h2 { margin-bottom: 12px; font-size: 1.2rem; }
.widget-header p { margin-top: 6px; color: #e1f0e8; }

.warning {
    margin: 12px 0;
    padding: 12px 14px;
    border-left: 4px solid #aa7124;
    border-radius: 5px;
    color: #542d08;
    background: #fff0d5;
}

.widget-section {
    margin: 12px 0;
    padding: clamp(12px, 3vw, 18px);
    border: 1px solid #c8d8d0;
    border-radius: 12px;
    background: #fff;
}

.fields { display: grid; gap: 10px; }
.drink-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.person-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields > div { min-width: 0; }

label {
    display: block;
    margin-bottom: 3px;
    font-weight: 650;
    font-size: .875rem;
}

input, select, button {
    min-height: 44px;
    font: inherit;
}

input, select {
    width: 100%;
    min-width: 0;
    padding: 8px;
    border: 1px solid #819b91;
    border-radius: 7px;
    color: inherit;
    background: #fff;
}

button {
    padding: 7px 13px;
    border: 1px solid #17644f;
    border-radius: 7px;
    color: #fff;
    background: #17644f;
    font-weight: 650;
    cursor: pointer;
}

button:hover { background: #114b3c; }
button:disabled { opacity: .6; cursor: default; }
button.secondary { color: #155342; background: #f2f9f5; }
button.secondary:hover { background: #dfefe6; }

:focus-visible { outline: 3px solid #145da0; outline-offset: 3px; }
a { color: #155342; }
.help { margin: 7px 0; color: #405851; font-size: .875rem; }
.help:empty { margin: 0; }

.search-results, .drink-list {
    display: grid;
    gap: 6px;
    margin: 8px 0;
    padding: 0;
    list-style: none;
}

button.search-result {
    display: block;
    width: 100%;
    padding: 9px;
    border-color: #bdcfc4;
    color: #162725;
    background: #f5faf7;
    text-align: left;
    overflow-wrap: anywhere;
}

button.search-result:hover { background: #e1f0e8; }
.search-result small, .drink-list small { display: block; color: #405851; font-weight: 450; }
#ppr-drink-form { margin-top: 12px; }

.drink-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    padding: 8px;
    border-top: 1px solid #d4e3d9;
    overflow-wrap: anywhere;
}

#ppr-selection { overflow-wrap: anywhere; }
.result { margin-top: 10px; }
#ppr-result-values {
    padding: 12px 14px;
    border: 1px solid #bdcfc4;
    border-radius: 9px;
    background: #eef7f1;
}
.result-value { margin-bottom: 4px; font-size: 1.2rem; font-weight: 750; }
#ppr-result-values .help { margin: 6px 0 0; }
.widget-footer { margin-top: 16px; font-size: .875rem; }

@media (max-width: 420px) {
    .drink-fields > :last-child, .person-fields > :last-child { grid-column: 1 / -1; }
    .person-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 290px) {
    .drink-fields, .person-fields { grid-template-columns: minmax(0, 1fr); }
}
