/* Modern Google 2024/2025 Search Styling */

/* Base Google styling - Google Sans font family */
body, td, a, p, .h {
    font-family: -apple-system, BlinkMacSystemFont, 'Google Sans', 'Segoe UI', Roboto, Arial, sans-serif;
    color: #202124;
    -webkit-font-smoothing: antialiased;
  }

/* Work search results - Modern Google 2024/2025 style */
.work-result {
  margin: 0 0 24px 0;
  padding: 0;
  max-width: 600px;
  display: flex;
  gap: 16px;
}

.work-result-content {
  flex: 1;
  min-width: 0;
}

.work-thumbnail {
  flex-shrink: 0;
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
  border: none;
}

.work-title {
  color: #1a73e8 !important; /* Modern Google blue */
  font-size: 20px;
  font-weight: 400;
  text-decoration: none;
  line-height: 1.3;
  display: block;
  margin-bottom: 4px;
}

.work-title:hover {
  text-decoration: underline;
}

.work-title:visited {
  color: #681da8 !important; /* Modern Google purple for visited */
}

.work-url {
  color: #5f6368; /* Modern Google gray */
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.work-url::before {
  content: '';
  width: 16px;
  height: 16px;
  background: #5f6368;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>') center/contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>') center/contain no-repeat;
  flex-shrink: 0;
}

.work-description {
  color: #4d5156; /* Modern Google dark gray */
  font-size: 14px;
  line-height: 1.58;
  margin-bottom: 8px;
}

.work-meta {
  color: #5f6368;
  font-size: 14px;
  line-height: 1.5;
}

.work-score {
  color: #70757a;
  font-size: 12px;
  font-style: normal;
}

/* Work page styling */
.work-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: arial, sans-serif;
}

.work-page header nav {
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e5e5;
}

.work-page header nav a {
  color: #1a0dab;
  text-decoration: none;
  margin-right: 20px;
}

.work-page header nav a:hover {
  text-decoration: underline;
}

.work-content h1 {
  color: #333;
  font-size: 32px;
  margin-bottom: 10px;
}

.work-meta {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

.work-meta span {
  margin-right: 15px;
}

.work-description {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 30px;
}

.work-images {
  margin: 30px 0;
}

.work-images img {
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border: 1px solid #ddd;
}

.work-text-content {
  line-height: 1.6;
  margin: 30px 0;
}

.work-text-content h2 {
  color: #333;
  font-size: 24px;
  margin: 30px 0 15px 0;
}

.work-tags {
  margin-top: 30px;
}

.work-tags .tag {
  background-color: #f0f0f0;
  color: #666;
  padding: 4px 8px;
  margin: 2px 4px 2px 0;
  font-size: 12px;
  border-radius: 3px;
  display: inline-block;
}
  
  input {
    font-family: inherit;
    font-size: 16px;
  }

  #searchInput {
    width: 584px;
    max-width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    box-sizing: border-box;
    background-color: #fff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    outline: none;
  }

  #searchInput:hover {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: rgba(223,225,229,0);
  }

  #searchInput:focus {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: rgba(223,225,229,0);
  }
  

  
  
  html, body {
    background-color: #fff;
    margin: 0;
    padding: 0;
  }
  
  canvas {
    display: block;
  }
  
  .wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
  }

  #homeScreen {
    z-index: 10; /* Home screen should be above background but below nav */
  }

  /* Results containers */
  .results-container {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding-top: 170px; /* Space for fixed nav */
  }

  #worksResultsScreen {
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 170px 20px 20px 20px;
  }

  #imageSearchScreen {
    padding-top: 170px;
  }

  #searchItemsWrapper {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
    width: 100vw;
    /* height: 100vh; */
  }
  /* #homeScreen {} */
  
  #homeScreenNav {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      padding: 14px 20px;
      border-bottom: 1px solid #e8eaed;
      z-index: 1000;
      background-color: #fff;
      text-align: left;
      box-sizing: border-box;
      display: flex;
      align-items: center;
      gap: 24px;
  }
  
  #title {
    font-family: googleFont-medium;
    font-size: 50pt;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #title img {
    width: 100%;
    /* max-width: 600px; */
    height: auto;
    padding: 5%;
    padding-top: 0;
    margin-top: -10%;
  }

  /* SVG logo specific styling */
  #homeLogo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
  #homeScreenSearchContainer {
    display: flex;
    flex-direction: column;
    width: 500px;
    max-width: 90%;
    z-index: 10;
  }
  
  #btnContainer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
      /* padding: 10px; */
  }
  
  
  
  #searchBtn, #luckyBtn {
      align-self: center;
      padding: 10px 24px;
      margin: 11px 4px;
      background-color: #f8f9fa;
      border: 1px solid #f8f9fa;
      border-radius: 4px;
      color: #3c4043;
      font-family: inherit;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s ease;
      min-height: 36px;
    }

  #searchBtn:hover, #luckyBtn:hover {
      box-shadow: 0 1px 1px rgba(0,0,0,0.1);
      background-color: #f8f9fa;
      border: 1px solid #dadce0;
      color: #202124;
    }

  #searchBtn:active, #luckyBtn:active {
      background-color: #f1f3f4;
    }

  #searchBtn:disabled, #luckyBtn:disabled {
      opacity: 0.38;
      cursor: not-allowed;
    }
  
  #homeScreenInfo {
    margin: 20px;
    margin-top: 50px;
  
    text-align: center;
  }
  
  #imageSearchScreen {
    display: none;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    gap: 0;
  }

  .imageSource {
    color: green;
  }
  
  /* 
  .resultDiv img {
    width: 100 !important;
    height: 200;
  } */
  
  /* Additional CSS for navigation - Modern Material Design */
  .navOption {
    padding: 12px 16px;
    text-decoration: none;
    color: #5f6368;
    font-size: 13px;
    font-weight: 500;
    border-radius: 24px;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .selectedNavOption {
    color: #1a73e8;
    background-color: #e8f0fe;
  }

  .navOption:hover {
    background-color: #f1f3f4;
    color: #202124;
  }

  .selectedNavOption:hover {
    background-color: #d2e3fc;
    color: #1a73e8;
  }

  /* ============================================ */
  /* INTEGRATED SEARCH BAR (Results View) */
  /* ============================================ */

  .results-search-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e8eaed;
    z-index: 1000;
    padding: 14px 20px 0;
  }

  .results-search-container {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 12px;
  }

  .results-logo {
    flex-shrink: 0;
    cursor: pointer;
  }

  .results-logo img {
    height: 30px;
    width: auto;
  }

  .integrated-search-wrapper {
    flex: 1;
    max-width: 692px;
    position: relative;
  }

  .integrated-search-input-container {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    padding: 0 14px;
    height: 44px;
    transition: box-shadow 0.2s ease;
  }

  .integrated-search-input-container:hover {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: rgba(223, 225, 229, 0);
  }

  .integrated-search-input-container:focus-within {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: rgba(223, 225, 229, 0);
  }

  .integrated-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    color: #202124;
    padding: 0;
    height: 100%;
  }

  .integrated-search-icon {
    flex-shrink: 0;
    background: none;
    border: none;
    border-left: 1px solid #e8eaed;
    padding: 0 0 0 12px;
    margin-left: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    transition: opacity 0.2s ease;
  }

  .integrated-search-icon:hover {
    opacity: 0.7;
  }

  .integrated-search-icon svg {
    display: block;
  }

  /* Results navigation tabs */
  .results-nav {
    display: flex;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }

  .results-nav-option {
    padding: 12px 0;
    text-decoration: none;
    color: #5f6368;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: color 0.15s ease;
  }

  .results-nav-option:hover {
    color: #202124;
  }

  .selected-results-nav {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
  }

  /* Google Images row-based layout */
  #imageSearchScreen {
    padding: 170px 8px 20px 8px !important;
    background: #fff;
  }

  .image-row {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
    justify-content: flex-start;
  }

  .result-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    flex-shrink: 0;
  }

  .image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f1f3f4;
    margin-bottom: 8px;
  }

  .result-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
  }

  .result-item:hover img {
    opacity: 0.85;
  }

  .imageInfo {
    padding: 0;
    line-height: 1.3;
  }

  .imageCaption {
    color: #202124;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .imageMeta {
    color: #70757a;
    font-size: 12px;
    line-height: 1.3;
    margin: 2px 0;
  }

  .imageSource {
    color: #70757a;
    font-size: 12px;
    line-height: 1.3;
    margin: 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .imageSource a {
    color: #70757a;
    text-decoration: none;
  }

  .imageSource a:hover {
    text-decoration: underline;
  }
  
  

/* body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
  } */
  
  /* #searchContainer {
    margin: 10px 0 20px 10px;
  } */
  
  /* #searchInput {
    width: 400px;
    height: 22px;
    border: 1px solid #999;
    padding: 3px;
    font-size: 14px;
  } */
  
  /* #searchBtn {
    height: 30px;
    margin-left: 5px;
    font-weight: bold;
    background: #f2f2f2;
    border: 1px solid #ccc;
    padding: 0 8px;
  } */
  
  /* Google 2009 image search results styling */
  .imageResult {
    display: inline-block;
    width: 140px;
    height: 170px;
    margin: 8px;
    vertical-align: top;
    overflow: hidden;
    text-align: center;
    position: relative;
  }
  
  .imageResult img {
    /* border: 1px solid #03c; */
    padding: 2px;
    max-width: 120px;
    max-height: 120px;
  }
  
  .imageResult:hover img {
    border-color: #f00;
  }
  
  .imageCaption {
    margin-top: 3px;
    width: 100%;
    font-size: 11px;
    line-height: 1.2;
    color: #333;
    text-align: center;
    overflow: hidden;
    height: 40px;
  }
  
  #imageSearchScreen {
    padding: 0px;
    display: flex;
    flex-wrap: wrap;
  }
  
  #title {
    font-size: 22px;
    margin: 10px;
    color: #2200C1;
  }
  
  .loadingMessage {
    font-size: 14px;
    color: #666;
    margin: 10px;
  }

  /* ------------------------------ SEARCH COMPLETION */
  /* Add these styles to your desktop.css file */

/* Search suggestions styling - Modern Google 2024/2025 */
.suggestions-list {
  position: absolute;
  width: 584px;
  max-height: 400px;
  overflow-y: auto;
  background-color: #fff;
  border: none;
  border-radius: 24px;
  margin-top: 8px;
  z-index: 999;
  display: none;
  box-shadow: 0 4px 6px rgba(32, 33, 36, 0.28);
  font-family: inherit;
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  text-align: left;
  font-size: 16px;
  color: #202124;
  border-bottom: none;
  transition: background-color 0.1s ease;
  display: block;
  font-weight: 400;
  line-height: 1.4;
}

.suggestion-item:first-child {
  border-radius: 24px 24px 0 0;
}

.suggestion-item:last-child {
  border-radius: 0 0 24px 24px;
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
  background-color: #f1f3f4;
}

.suggestion-bold {
  font-weight: 600;
}

.highlight {
  font-weight: 400;
  color: #202124;
}

/* Position the suggestions correctly for both layouts */
#homeScreenSearchContainer {
  position: relative;
}

/* Make sure the suggestions appear below the search input in both layouts */
#suggestionsList {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
}

/* ============================================ */
/* RESPONSIVE DESIGN - 3 BREAKPOINTS */
/* ============================================ */

/* TABLET (max-width: 1024px) */
@media screen and (max-width: 1024px) {
  /* Homepage adjustments */
  #homeScreenSearchContainer {
    width: 90% !important;
  }

  #searchInput {
    width: 100%;
    font-size: 16px;
  }

  .suggestions-list {
    width: 100%;
  }

  /* Results search bar */
  .results-search-container {
    padding: 0 12px 12px;
  }

  .results-logo img {
    height: 28px;
  }

  .integrated-search-wrapper {
    max-width: 600px;
  }

  /* Works results */
  #worksResultsScreen {
    max-width: 90%;
    padding: 170px 20px 20px 20px;
  }

  .work-result {
    max-width: 100%;
  }

  .work-thumbnail {
    width: 92px;
    height: 92px;
  }

  /* Images results - row-based layout adapts automatically via JS */
  #imageSearchScreen {
    padding: 170px 8px 20px 8px !important;
  }
}

/* PHONE (max-width: 768px) */
@media screen and (max-width: 768px) {
  /* Navigation */
  #homeScreenNav, .home-nav {
    padding: 12px 16px;
    gap: 12px;
    justify-content: center;
  }

  .navOption {
    padding: 10px 14px;
    font-size: 12px;
  }

  /* Homepage */
  #homeScreenSearchContainer {
    width: 95% !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #title {
    text-align: center;
  }

  #searchInput {
    width: 100% !important;
    margin: 5px 0 !important;
    font-size: 16px;
    height: 48px;
  }

  #searchBtn, #luckyBtn {
    width: 100% !important;
    margin: 8px 0 !important;
    padding: 14px !important;
    font-size: 14px;
  }

  /* Results search bar - centered layout */
  .results-search-bar {
    padding: 12px 8px 0;
  }

  .results-search-container {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0;
  }

  .results-logo {
    order: -1;
    margin-bottom: 8px;
  }

  .results-logo img {
    height: 24px;
  }

  .integrated-search-wrapper {
    width: 100%;
    max-width: 100%;
  }

  .integrated-search-input-container {
    height: 40px;
  }

  .integrated-search-input {
    font-size: 14px;
  }

  /* Results navigation */
  .results-nav {
    justify-content: center;
    padding: 0 8px;
    gap: 16px;
  }

  .results-nav-option {
    font-size: 12px;
    padding: 10px 0;
  }

  /* Works results */
  #worksResultsScreen {
    max-width: 95%;
    padding: 170px 10px 20px 10px;
  }

  .work-title {
    font-size: 16px;
  }

  .work-url {
    font-size: 13px;
  }

  .work-description {
    font-size: 13px;
  }

  .work-meta {
    font-size: 12px;
  }

  .work-thumbnail {
    width: 80px;
    height: 80px;
  }

  /* Images results - row-based layout adapts automatically via JS */
  #imageSearchScreen {
    padding: 170px 4px 20px 4px !important;
  }

  .image-row {
    gap: 2px;
    margin-bottom: 2px;
  }

  .imageCaption {
    font-size: 12px;
  }

  .imageMeta,
  .imageSource {
    font-size: 11px;
  }

  /* Autocomplete */
  .suggestions-list {
    width: 100% !important;
    font-size: 16px;
    max-height: 300px;
  }

  .suggestion-item {
    padding: 12px 16px;
    font-size: 16px;
  }
}