.gsc-results .gsc-cursor { color: white!important;fill: white!important; }
.gsc-results{width:100%!important;padding:0!important}
.cse .gsc-control-cse,.gsc-control-cse{width:100%!important;padding:0!important}
.gsc-table-cell-snippet-close,.gsc-table-cell-snippet-open,.gsc-url-top{display:none!important}
.gsc-above-wrapper-area,.gsc-control-cse,.gsc-results .gsc-imageResult,.gsc-webResult.gsc-result{background:0 0!important;border:0!important}
.gsc-webResult .gsc-result{width:calc((100% - 40.1px)/ 3)!important;margin:0px 10px 20px 10px!important;border:1px solid #ddd!important;overflow:hidden!important;background:#000!important;display:inline-block!important;padding:0!important;height:auto!important;float:right!important;position:relative!important}
.gsc-webResult .gsc-result:nth-child(3n){margin:0 0 20px 0!important}
.gsc-imageResult:hover,.gsc-webResult.gsc-result:hover{border:1px solid #ddd!important;background:#000!important}
.gs-image-box.gs-web-image-box.gs-web-image-box-landscape,.gs-image-box.gs-web-image-box.gs-web-image-box-portrait{width:100%!important;padding:0!important;height:100%!important}
.gs-web-image-box-landscape img.gs-image,.gs-web-image-box-portrait img.gs-image{max-width:100%!important;max-height:100%!important;width:100%!important;border:0!important}
.gsc-table-result,.gsc-thumbnail-inside,.gsc-url-top{padding:0!important}
.gs-title{height:64px!important;line-height:1.8!important;color:#fff!important;text-align:right!important;font-size:15px!important;direction:rtl!important;overflow:hidden!important;padding:8px 10px 0!important;margin-bottom:10px!important}
.gsc-control-cse .gs-result .gs-title,.gsc-control-cse .gs-result .gs-title *,.gsc-control-cse .gsc-spelling{font-size:15px!important}
a.gs-title{padding:0!important;margin-bottom:10px!important}
.gs-title:hover{color:#0277bd!important}
.gs-webResult.gs-result{display:grid!important}
.gsc-control-cse .gsc-table-result{order:1!important}
.gsc-thumbnail-inside{position:relative!important;order:2!important}
.gsc-result-info{width:100%!important;display:inline-block!important;float:right!important;background:#000!important;text-align:center!important;color:#fff!important;font-size:12px!important;position:relative!important;padding:0!important}
.gsc-results .gsc-cursor-box{margin:0!important;display:inline-block!important;width:100%!important;text-align:center!important}
.gsc-results .gsc-cursor-box .gsc-cursor-page{float:right!important;display:inline-block!important;width:36px!important;height:36px!important;text-align:center!important;font-size:14px!important;color:#fff!important;line-height:2.5!important;background:#0277bd!important;margin-left:4px!important;margin-bottom:4px!important}
.gsc-results .gsc-cursor-box .gsc-cursor-current-page{background:silver!important}
a.gs-image{position:relative!important;padding-bottom:67%!important;width:100%!important;display:inline-block!important;max-width:100%!important;max-height:100%!important}
img.gs-image{position:absolute!important;bottom:0!important;right:0!important;top:0!important;left:0!important;width:100%!important;height:100%!important}
.gs-imageResult a.gs-title:visited b,.gs-webResult.gs-result a.gs-title:visited b{color:#0277bd!important;font-weight:400!important}
.gs-imageResult a.gs-title:link b,.gs-webResult.gs-result a.gs-title:link b{color:#0277bd!important;font-weight:400!important}
	
@media only screen and (max-width: 479px) and (min-width: 320px){
  img.attachment-thumbnail.size-thumbnail.tie-appear{width:49%;height:200px}
  .gsc-webResult .gsc-result{width:100%!important;margin-left:0!important}
  a.gs-image{width:150px!important;padding-bottom:calc((150px * 67)/ 100)!important;float:right!important}
  .gsc-control-cse .gsc-table-result{float:right!important;width:150px!important}
  .gs-webResult.gs-result{display:flex!important}
  .gsc-thumbnail-inside{width:calc(100% - 150px);float:right!important}
  .gsc-results .gsc-cursor { color: white!important;fill: white!important; }
}

.search-results-wrapper {
  min-height: 400px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  padding: 10px;
  border-radius: 10px;
}

/* Dark mode base */
.dark-mode {
  background-color: #1e1e1e;
  border: 1px solid #333;
  color: #ddd;
}

/* Placeholder styles */
#search-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #bbb;
  font-size: 16px;
  text-align: center;
  width: 90%;
  box-sizing: border-box;
}

/* Spinner styles */
.loader {
  border: 5px solid #333;
  border-top: 5px solid #ccc;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  margin: 0 auto 10px auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Force Google CSE results to dark theme */
.gsc-control-cse,
.gsc-result,
.gsc-webResult,
.gsc-results {
  background-color: #1e1e1e !important;
  color: #ddd !important;
  border: none !important;
}

.gsc-control-cse a,
.gsc-webResult a {
  color: #4ea3ff !important;
}

.gsc-result .gs-snippet {
  color: #aaa !important;
}

.gsc-input-box,
.gsc-input-box input {
  background-color: #2b2b2b !important;
  color: #ddd !important;
  border: 1px solid #444 !important;
}

.gsc-cursor-page {
  background-color: #2b2b2b !important;
  color: #ddd !important;
}

.gsc-cursor-page.gsc-cursor-current-page {
  background-color: #4ea3ff !important;
  color: #fff !important;
}

.gsc-result-info-container {background-color: transparent!important; border-color: #444!important; }
.gsc-above-wrapper-area-container {margin-bottom: 20px!important; }

/* Responsive adjustments */
@media (max-width: 600px) {
  .search-results-wrapper {
    min-height: 300px;
    padding: 5px;
  }
  #search-placeholder {
    font-size: 14px;
  }
  .loader {
    width: 28px;
    height: 28px;
    border-width: 4px;
  }
}

.gsc-wrapper {max-width: 99%!important; }
.gsc-webResult-divider {display: none!important; }