/* Pub Search Block Styles */
.redcat-pub-search {
   font-family: var(--wp--preset--font-family--body-font);
   color: #333 !important;
}

.redcat-pub-search * {
   color: inherit;
}

/* Editor Preview Notice */
.block-editor-notice {
   background: #fff3cd;
   border: 1px solid #ffeaa7;
   color: #856404;
   padding: 1rem;
   border-radius: 4px;
   text-align: center;
}

.block-editor-notice h4 {
   margin: 0 0 0.5rem 0;
   color: #856404;
}

.block-editor-notice p {
   margin: 0;
   font-size: 0.9rem;
}

/* Banner Content */
.pub-search-banner .banner-content {
   position: absolute;
   inset: 0;
   display: flex;
   flex-direction: column;
   padding-bottom: 40px;
   z-index: 10;
}
.pub-search-container {
   width: 100%;
   margin: auto auto 0 auto;
   padding: 20px 40px;
   background: rgba(0, 0, 0, 0.6);
}
.pub-search-container.full-width {
   max-width: 100%;
}
.pub-search-container.compact {
   max-width: 1070px;
}
.pub-search-form {
   position: relative;
}
.pub-search-form .search-header {
   margin-bottom: 16px;
}
.pub-search-form .search-header .search-title {
   font-family: var(--wp--preset--font-family--heading-font);
   font-size: var(--wp--preset--font-size--heading-2);
   font-weight: 500;
   color: var(--wp--preset--color--white);
   text-align: center;
   letter-spacing: 1.5px;
   text-transform: uppercase;
}

.pub-search-form .search-fields {
   display: flex;
   align-items: center;
   flex-direction: row;
   gap: 1rem 1rem;
}

.pub-search-form .search-field {
   flex: 0 0 auto;
   position: relative;
}
.pub-search-form .search-field.destination-field {
   width: 26%;
}
.pub-search-form .search-field.dates-field {
   width: 34%;
}
.pub-search-form .search-field.guests-field {
   width: 18%;
}
.pub-search-form .search-field.search-action {
   width: calc(22% - 45px);
}
.pub-search-form .search-field.destination-field label {
   display: none;
}
.redcat-pub-search .pub-search-form .search-field .search-button.loading {
   opacity: 0.7;
   pointer-events: none;
}
.redcat-pub-search .pub-search-form .search-field .search-button.loading::after {
   content: "";
   display: inline-block;
   width: 16px;
   height: 16px;
   margin-left: 8px;
   border: 2px solid transparent;
   border-top: 2px solid white;
   border-radius: 50%;
   animation: spin 0.8s linear infinite;
}

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

/* Radius Field */
.radius-field {
   transition: opacity 0.3s ease;
}
.radius-field[style*="none"] {
   opacity: 0;
   pointer-events: none;
}

/* ==========================================================================
   ENHANCED FORM STYLES
   ========================================================================== */
.pub-search-form .search-field .search-input {
   font-family: var(--wp--preset--font-family--body-font);
   font-size: 16px!important;
   font-weight: 400;
   color: var(--wp--preset--color--black);
   background: #F0EBDA;
   border: 1px solid #F0EBDA;
   padding: 6px 16px;
   height: 46px;
   display: block;
   width: 100%;
   cursor: pointer;
}
.pub-search-form .search-field .search-input:focus {
   outline: none;
   box-shadow: none;
}

/* Dates Field */
.pub-search-form .search-field.dates-field .date-inputs {
   display: flex;
   align-items: center;
   gap: 0;
   background: #F0EBDA;
   position: relative;
}
.pub-search-form .search-field.dates-field .date-input {
   opacity: 0;
   background-repeat: no-repeat;
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-minus-icon lucide-minus'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
   background-size: 20px;
}
.pub-search-form .search-field.dates-field .date-input:first-child {
   border-right: 0;
   background-position: center right -10px;
}
.pub-search-form .search-field.dates-field .date-input:last-child {
   border-left: 0;
   background-position: center left -10px;
}
.pub-search-form .search-field.dates-field .date-separator {
   display: none;
}
.pub-search-form .search-field.dates-field .date-display {
   font-size: 16px;
   color: var(--wp--preset--color--black);
   text-align: center;
   position: absolute;
   width: 100%;
   top: 50%;
   left: 0;
   transform: translateY(-50%);
   padding: 6px 16px;
   pointer-events: none;
}
.pub-search-form .search-field.dates-field .date-inputs:focus-within + .date-display {
   display: none;
}
.pub-search-form .search-field.dates-field .date-inputs:focus-within .date-input {
   opacity: 1;
}

/* Guests Field */
.pub-search-form .search-field.guests-field .guests-toggle {
   color: var(--wp--preset--color--black);
   display: flex!important;
   align-items: center;
   justify-content: space-between;
}
.redcat-pub-search .search-field.guests-field .chevron-down {
   transition: transform 0.3s ease;
   position: relative;
   right: -10px;
}

/* Guests Dropdown */
.guests-dropdown {
   position: absolute;
   width: 320px;
   top: 100%;
   left: 50%;
   right: 0;
   transform: translateX(-50%);
   background: var(--wp--preset--color--white);
   border-radius: 4px;
   box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
   margin-top: 0.5rem;
   z-index: 100;
}
.guests-dropdown .guests-content {
   padding: 1.5rem;
}
.guests-dropdown .guests-content h4 {
   font-size: 18px;
   font-weight: 500;
   color: var(--wp--preset--color--black);
   margin: 0 0 0.5rem 0;
   text-transform: uppercase;
}
.guests-dropdown .guest-type {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 1rem 0;
   border-bottom: 1px solid #f3f4f6;
}
.guests-dropdown .guest-type:last-of-type {
   border-bottom: none;
}
.guests-dropdown .guest-info {
   display: flex;
   flex-direction: column;
}
.guests-dropdown .guest-label {
   font-family: var(--wp--preset--font-family--heading-font);
   font-size: 16px;
   font-weight: 400;
   color: var(--wp--preset--color--black);
   text-transform: uppercase;
}
.guests-dropdown .guest-description {
   font-size: 0.875rem;
   color: #666;
}
.guests-dropdown .guest-controls {
   display: flex;
   align-items: center;
   gap: 1rem;
}
.guests-dropdown .guest-btn {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 32px;
   height: 32px;
   border: 2px solid #e5e7eb;
   border-radius: 50%;
   background: var(--wp--preset--color--white);
   cursor: pointer;
   transition: all 0.3s ease;
}
.guests-dropdown .guest-btn:hover {
   border-color: var(--wp--preset--color--primary);
}
.guests-dropdown .guest-btn:disabled {
   opacity: 0.5;
   cursor: not-allowed;
}
.guests-dropdown .guest-count {
   font-weight: 400;
   color: var(--wp--preset--color--primary);
   min-width: 20px;
   text-align: center;
}
.guests-dropdown .guests-actions {
   display: flex;
   justify-content: space-between;
   padding-top: 1rem;
}
.guests-dropdown .btn-clear,
.guests-dropdown .btn-apply {
   font-family: var(--wp--preset--font-family--body-font);
   font-size: var(--wp--preset--font-size--button);
   font-weight: var(--wp--custom--font-weight--regular);
   display: inline-block;
   border-radius: 0px;
   border: 1px solid transparent;
   letter-spacing: 0;
   line-height: 25px;
   padding: 8px 24px;
   text-decoration: none;
   text-transform: capitalize;
   cursor: pointer;
}
.guests-dropdown .btn-clear {
   background-color: transparent;
}
.guests-dropdown .btn-apply {
   color: var(--wp--preset--color--white);
   background-color: var(--wp--preset--color--primary);
}
.guests-dropdown .btn-clear {
   color: var(--wp--preset--color--primary);
   border-color: var(--wp--preset--color--primary);
}
.pub-search-form .search-field.search-action .search-button {
   font-family: inherit;
   font-size: var(--wp--preset--font-size--button);
   font-weight: var(--wp--custom--font-weight--regular);
   background-color: var(--wp--preset--color--primary);
   border-radius: 0px;
   border-width: 0;
   color: var(--wp--preset--color--white);
   letter-spacing: 0;
   line-height: 25px;
   padding: 10px 25px;
   text-decoration: none;
   text-transform: capitalize;
   display: block;
   width: 100%;
   cursor: pointer;
}

@media (max-width: 991px) {
   .pub-search-container {
      background: #FFF;
   }
   .pub-search-form .search-header .search-title {
      color: var(--wp--preset--color--primary);
   }
   .pub-search-banner .banner-content {
      position: static;
      padding-bottom: 0;
   }
   .pub-search-form .search-fields {
      flex-wrap: wrap;
      flex-direction: column;
   }
   .pub-search-form .search-field.destination-field,
   .pub-search-form .search-field.dates-field,
   .pub-search-form .search-field.guests-field,
   .pub-search-form .search-field.search-action {
      width: 100%;
   }
   .pub-search-form .search-field .search-input {
      text-align: center;
   }
   .pub-search-form .search-field.guests-field .guests-toggle {
      justify-content: center;
   }
}
@media (max-width: 767px) {
   .pub-search-container {
      padding: 30px 25px;
   }
   .pub-search-form .search-field.dates-field .date-display {
      text-align: left;
   }
   .pub-search-form .search-field .search-input {
      text-align: left;
   }
   .pub-search-form .search-field.dates-field .date-input {
      background-image: none;
   }
   .pub-search-form .search-field.guests-field .guests-toggle {
      justify-content: space-between;
   }
}


/* ==========================================================================
   BANNER STYLES
   ========================================================================== */
/* Banner Container */
.pub-search-banner {
   position: relative;
   width: 100%;
}
.pub-search-banner .banner-main-container {
   position: relative;
}
.pub-search-banner.banner-height-small .banner-main-container {
   min-height: 400px;
}
.pub-search-banner.banner-height-medium .banner-main-container {
   min-height: 500px;
}
.pub-search-banner.banner-height-large .banner-main-container {
   min-height: 600px;
}
.pub-search-banner.banner-height-full .banner-main-container {
   height: 100vh;
   min-height: 540px;
   overflow: hidden;
}

.pub-search-banner .banner-image {
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   background-size: cover;
   background-position: center;
   background-repeat: no-repeat;
}
.pub-search-banner .banner-image .banner-img-element {
   display: block;
   position: relative;
   width: 100%;
   height: 100%;
   object-fit: cover;
   object-position: center center;
}

/* Banner Video */
.redcat-pub-search .banner-video {
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   background: var(--wp--preset--color--black);
}
.redcat-pub-search .video-poster {
   position: absolute;
   inset: 0;
   background-size: cover;
   background-position: center;
   background-repeat: no-repeat;
   transition: opacity 0.5s ease;
   z-index: 1;
}

.redcat-pub-search .video-poster-element {
   width: 100%;
   height: 100%;
   object-fit: cover;
   object-position: center center;
}

.redcat-pub-search .banner-video.video-loaded .video-poster {
   opacity: 0;
   pointer-events: none;
}

/* Video Loading Indicator */
.video-loading-indicator {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   z-index: 2;
   color: white;
   text-align: center;
}

.loading-spinner {
   width: 40px;
   height: 40px;
   border: 3px solid rgba(255, 255, 255, 0.3);
   border-top: 3px solid white;
   border-radius: 50%;
   animation: spin 1s linear infinite;
   margin: 0 auto;
}

/* Hide loading indicator when video is loaded */
.banner-video.video-loaded .video-loading-indicator {
   display: none;
}

.banner-video-element {
   position: absolute;
   top: 50%;
   left: 50%;
   width: 100vw;
   height: 56.25vw;
   min-height: 100%;
   min-width: 177.77vh;
   transform: translate(-50%, -50%);
   pointer-events: none;
   border: none;
   outline: none;
   transition: opacity 0.8s ease-in-out;
   z-index: 1;
}


/* Banner Overlays */
.redcat-pub-search .banner-overlay {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   z-index: 1;
}
.redcat-pub-search .banner-overlay.overlay-light {
   background: rgba(255, 255, 255, 0.25);
}
.redcat-pub-search .banner-overlay.overlay-medium {
   background: rgba(0, 0, 0, 0.5);
}
.redcat-pub-search .banner-overlay.overlay-dark {
   background: rgba(0, 0, 0, 0.75);
}
.redcat-pub-search .banner-overlay.overlay-gradient {
   background: linear-gradient( 135deg,
   rgba(0, 0, 0, 0.3) 0%,
   rgba(0, 0, 0, 0.7) 100%);
}

/* Accessibility - Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
   .banner-video-element {
      display: none;
   }

   .pub-search-banner.banner-youtube::after,
   .pub-search-banner.banner-vimeo::after {
      content: "🎥 Video disabled due to motion preferences";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: white;
      background: rgba(0, 0, 0, 0.8);
      padding: 1rem;
      border-radius: 4px;
      z-index: 1;
   }
}