/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

body {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

* {
  box-sizing: border-box;
}

:root {
  --white: #FFFFFF;
  --active: var(--white);
  --hover: var(--white);
  --text: var(--white);
  --background: #0053DB;
  --success: #4CAF50;
  --error: #f44336;
  --warning: #ff9800;
}

body {
  color: var(--text);
  background: var(--background);
  font-size: 1.1em;
  line-height: 1.45;
  font-weight: normal;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0.5em;
}

/* POI POI Styles - Mobile First */
.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 1em;
}

h1 {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 1em;
  text-align: center;
  line-height: 1.2;
}

.btn {
  display: block;
  width: 100%;
  margin: 0 auto 1.5em;
  padding: 1.2em 1.5em;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--background);
  background: var(--white);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  white-space: nowrap;
}
.btn:hover:not(:disabled), .btn:active:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.loading {
  text-align: center;
  font-size: 1.1em;
  margin: 1.5em 0;
  color: var(--white);
  padding: 1em;
}

.results {
  margin-top: 1.5em;
}
.results h2 {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 1em;
  text-align: center;
  line-height: 1.3;
}

.poi-list {
  display: grid;
  gap: 1em;
  grid-template-columns: 1fr;
}

.poi-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.2em;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.poi-item:hover, .poi-item:active {
  transform: translateY(-2px);
}
.poi-item h3 {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 0.5em;
  color: var(--white);
  line-height: 1.3;
}
.poi-item p {
  margin-bottom: 0.4em;
  font-size: 0.95em;
  line-height: 1.4;
}
.poi-item .poi-summary {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1em;
  margin-bottom: 1em;
  font-weight: 500;
}
.poi-item strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.poi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5em;
  gap: 0.5em;
}
.poi-header h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.poi-distance {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Check-in Button Styles */
.checkin-btn {
  display: block;
  width: 100%;
  margin-top: 1em;
  padding: 0.8em 1.2em;
  font-size: 1em;
  font-weight: 600;
  color: var(--white);
  background: var(--success);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.checkin-btn:hover:not(:disabled) {
  background: #45a049;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.checkin-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.checkin-btn.checked-in {
  background: var(--success);
  color: var(--white);
}
.checkin-btn.error {
  background: var(--error);
  color: var(--white);
}

/* Check-ins Section */
.checkins-section {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.checkins-section h2 {
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 1em;
  text-align: center;
  line-height: 1.3;
}

.checkins-list {
  display: grid;
  gap: 1em;
}

.no-checkins {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  padding: 2em;
}

.checkin-item {
  background: rgba(255, 255, 255, 0.08);
  padding: 1.2em;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}
.checkin-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.checkin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5em;
  flex-wrap: wrap;
  gap: 0.5em;
}
.checkin-header h4 {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--white);
  margin: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.checkin-title-section {
  flex: 1;
  min-width: 0;
}

.checkin-time {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-top: 0.2em;
}

.checkin-actions {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.checkin-category {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.3em;
  text-transform: capitalize;
}

.checkin-distance {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.3em;
}

.checkin-address,
.checkin-description,
.checkin-rating,
.checkin-website,
.checkin-phone,
.checkin-hours,
.checkin-notes {
  font-size: 0.9em;
  margin-top: 0.4em;
  line-height: 1.4;
}

.checkin-address {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.checkin-description {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}

.checkin-rating {
  color: #ffd700;
  font-weight: 600;
}

.checkin-website a {
  color: #4fc3f7;
  text-decoration: none;
}
.checkin-website a:hover {
  text-decoration: underline;
}

.checkin-phone {
  color: #4caf50;
}

.checkin-hours {
  color: #ff9800;
}

.checkin-notes {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  margin-top: 0.5em;
  padding-top: 0.5em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.error {
  text-align: center;
  color: #ff6b6b;
  font-size: 1em;
  padding: 1em;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 107, 0.3);
  margin: 1em 0;
}

/* Location Error Styles */
.location-error {
  background: rgba(255, 255, 255, 0.1);
  padding: 2em;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  margin: 2em 0;
}
.location-error h3 {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--white);
  margin-bottom: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}
.location-error p {
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2em;
  line-height: 1.5;
}

.location-help {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5em;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}
.location-help h4 {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--white);
  margin-bottom: 1em;
}
.location-help ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5em;
}
.location-help ul li {
  padding: 0.5em 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95em;
  line-height: 1.4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.location-help ul li:last-child {
  border-bottom: none;
}
.location-help ul li strong {
  color: var(--white);
  font-weight: 600;
}

.retry-btn {
  background: var(--white);
  color: var(--background);
  border: none;
  padding: 0.8em 1.5em;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.retry-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.retry-btn:active {
  transform: translateY(0);
}

/* Tablet Styles */
@media (min-width: 768px) {
  body {
    padding: 1em;
    font-size: 1.3em;
  }
  .container {
    max-width: 600px;
    padding: 2em;
  }
  h1 {
    font-size: 2.2em;
  }
  .btn {
    max-width: 320px;
    padding: 1em 2em;
    font-size: 1.2em;
  }
  .poi-list {
    gap: 1.2em;
  }
  .poi-item {
    padding: 1.4em;
  }
  .poi-item h3 {
    font-size: 1.35em;
  }
  .poi-item p {
    font-size: 1em;
  }
  .checkin-btn {
    padding: 0.9em 1.5em;
    font-size: 1.05em;
  }
  .checkins-section h2 {
    font-size: 2em;
  }
  .checkin-item {
    padding: 1.4em;
  }
  .checkin-header h4 {
    font-size: 1.3em;
  }
  .delete-checkin-btn {
    width: 32px;
    height: 32px;
  }
  .delete-icon {
    font-size: 1.3em;
  }
}
/* Desktop Styles */
@media (min-width: 1024px) {
  body {
    font-size: 1.4em;
  }
  .container {
    max-width: 800px;
    padding: 2.5em;
  }
  h1 {
    font-size: 2.5em;
  }
  .btn {
    max-width: 320px;
  }
  .poi-list {
    gap: 1.5em;
  }
  .poi-item {
    padding: 1.5em;
  }
  .poi-item h3 {
    font-size: 1.4em;
  }
  .results h2 {
    font-size: 1.8em;
  }
  .checkin-btn {
    padding: 1em 1.8em;
    font-size: 1.1em;
  }
  .checkins-section h2 {
    font-size: 2.2em;
  }
  .checkin-item {
    padding: 1.6em;
  }
  .delete-checkin-btn {
    width: 36px;
    height: 36px;
  }
  .delete-icon {
    font-size: 1.4em;
  }
}
/* Large Desktop Styles */
@media (min-width: 1440px) {
  .container {
    max-width: 900px;
  }
  .poi-list {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2em;
  }
  .checkins-list {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5em;
  }
}
/* Landscape Mobile Optimization */
@media (max-height: 500px) and (orientation: landscape) {
  body {
    padding: 0.3em;
  }
  .container {
    padding: 0.8em;
  }
  h1 {
    font-size: 1.8em;
    margin-bottom: 0.8em;
  }
  .btn {
    margin-bottom: 1em;
    padding: 0.8em 1.5em;
  }
  .poi-list {
    gap: 0.8em;
  }
  .poi-item {
    padding: 1em;
  }
  .checkins-section {
    margin-top: 2em;
    padding-top: 1.5em;
  }
  .checkin-item {
    padding: 1em;
  }
}
/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .btn {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }
  .btn:hover:not(:disabled) {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  }
  .poi-item {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  }
  .checkin-btn {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  }
  .checkin-btn:hover:not(:disabled) {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  }
}
/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .poi-item,
  .checkin-btn,
  .checkin-item,
  .delete-checkin-btn {
    transition: none;
  }
  .btn:hover:not(:disabled),
  .poi-item:hover,
  .checkin-btn:hover:not(:disabled),
  .checkin-item:hover,
  .delete-checkin-btn:hover {
    transform: none;
  }
}
/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1a2e;
  }
  .poi-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
  .checkin-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
  }
  .checkin-item:hover {
    background: rgba(255, 255, 255, 0.08);
  }
  .delete-checkin-btn:hover {
    background: rgba(255, 255, 255, 0.15);
  }
}
/* Delete Check-in Button */
.delete-checkin-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0.3em;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-shrink: 0;
}
.delete-checkin-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--error);
  transform: scale(1.1);
}
.delete-checkin-btn:active {
  transform: scale(0.95);
}
.delete-checkin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.delete-icon {
  font-size: 1.2em;
  font-weight: bold;
  line-height: 1;
}