/**
 * Indoor Cinema Events & Shortcode Stylesheet
 * 
 * Design Details:
 * - 2-Column Grid Layout
 * - Cinema Ticket Card Design
 * - Inherits Website Dark Theme Color Variables
 */

:root {
  /* Color System - Bound to Theme Variables with Fallbacks */
  --ice-bg-primary: var(--e-global-color-primary, #0d1b2a);
  --ice-secondary: var(--e-global-color-secondary, #c9a84c); /* Gold */
  --ice-text-main: var(--e-global-color-text, #f0ede6); /* Off-white */
  --ice-accent: var(--e-global-color-accent, #ff5f5f); /* Red */
  --ice-teal: var(--e-global-color-c95f041, #00d4c8); /* Teal */
  --ice-overlay: var(--e-global-color-4cbe754, rgba(240, 237, 230, 0.12));
  
  --ice-text-muted: rgba(240, 237, 230, 0.6);
  --ice-border-color: var(--ice-overlay);
  
  --ice-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --ice-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --ice-shadow-xl: 0 20px 35px rgba(0, 0, 0, 0.65);
  
  --ice-radius-md: 12px;
  --ice-radius-lg: 18px;
  --ice-radius-full: 9999px;
  
  --ice-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   1. Search Bar Styling
   ========================================================================== */
.ice-search-container {
  width: 100%;
  max-width: 720px;
  margin: 1.5rem auto;
  box-sizing: border-box;
}

.ice-search-container * {
  box-sizing: border-box;
}

.ice-search-form {
  display: flex;
  gap: 12px;
  align-items: stretch;
  width: 100%;
}

.ice-search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--ice-overlay);
  border: 1.5px solid var(--ice-border-color);
  border-radius: var(--ice-radius-lg);
  padding: 0 16px 0 48px;
  box-shadow: var(--ice-shadow-md);
  transition: all var(--ice-transition);
}

.ice-search-input-wrapper:focus-within {
  border-color: var(--ice-secondary);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.15), var(--ice-shadow-lg);
}

.ice-search-icon {
  position: absolute;
  left: 18px;
  display: flex;
  align-items: center;
  color: var(--ice-text-muted);
  pointer-events: none;
}

.ice-search-icon svg {
  width: 20px;
  height: 20px;
}

.ice-search-input-wrapper:focus-within .ice-search-icon {
  color: var(--ice-secondary);
}

.ice-search-input {
  width: 100%;
  height: 54px;
  border: none;
  background: transparent;
  color: var(--ice-text-main);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  padding: 0;
  box-shadow: none !important;
}

.ice-search-input::placeholder {
  color: var(--ice-text-muted);
  opacity: 0.6;
}

.ice-search-clear {
  position: absolute;
  right: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ice-text-muted);
  border-radius: var(--ice-radius-full);
  cursor: pointer;
}

.ice-search-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--ice-secondary) 0%, var(--ice-teal) 100%);
  color: var(--ice-bg-primary);
  border: none;
  border-radius: var(--ice-radius-lg);
  padding: 0 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.25);
  transition: all var(--ice-transition);
}

.ice-search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
}

.ice-btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform var(--ice-transition);
}

.ice-search-submit:hover .ice-btn-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   2. Cinema Filters Bar & Chips
   ========================================================================== */
.ice-wrapper {
  margin: 2rem 0;
  box-sizing: border-box;
}

.ice-wrapper * {
  box-sizing: border-box;
}

.ice-filters-bar {
  margin-bottom: 2.5rem;
  background: var(--ice-overlay);
  border: 1.5px solid var(--ice-border-color);
  border-radius: var(--ice-radius-lg);
  padding: 20px 24px;
  box-shadow: var(--ice-shadow-md);
}

.ice-filters-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ice-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ice-filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ice-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ice-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ice-chip {
  cursor: pointer;
  position: relative;
}

.ice-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ice-chip span {
  display: block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ice-text-muted);
  border: 1px solid var(--ice-border-color);
  border-radius: var(--ice-radius-full);
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--ice-transition);
}

.ice-chip:hover span {
  color: var(--ice-text-main);
  border-color: var(--ice-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.ice-chip.active span {
  background: var(--ice-secondary);
  color: var(--ice-bg-primary);
  border-color: var(--ice-secondary);
  box-shadow: 0 4px 10px rgba(201, 168, 76, 0.25);
}

.ice-select {
  background: rgba(0, 0, 0, 0.3);
  color: var(--ice-text-main);
  border: 1px solid var(--ice-border-color);
  border-radius: var(--ice-radius-md);
  padding: 8px 36px 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all var(--ice-transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f0ede6' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.ice-select:hover {
  border-color: var(--ice-secondary);
}

/* ==========================================================================
   3. Results Header & 2-Column Cinema Grid
   ========================================================================== */
.ice-results-header {
  margin-bottom: 2rem;
  border-bottom: 1.5px solid var(--ice-border-color);
  padding-bottom: 1.5rem;
}

.ice-results-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(201, 168, 76, 0.12);
  color: var(--ice-secondary);
  font-weight: 700;
  font-size: 12px;
  padding: 4px 14px;
  border-radius: var(--ice-radius-full);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(201, 168, 76, 0.25);
}

.ice-results-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--ice-text-main);
  margin: 0;
}

.ice-search-term {
  color: var(--ice-secondary);
}

/* 2 COLUMNS GRID */
.ice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 3rem;
}

/* ==========================================================================
   4. Cinema Ticket Card Design
   ========================================================================== */
.ice-card {
  background: linear-gradient(145deg, rgba(13, 27, 42, 0.95) 0%, rgba(22, 38, 56, 0.95) 100%);
  border: 1.5px solid rgba(201, 168, 76, 0.3);
  border-radius: var(--ice-radius-lg);
  overflow: hidden;
  box-shadow: var(--ice-shadow-md);
  transition: all var(--ice-transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.ice-card:hover {
  transform: translateY(-6px);
  border-color: var(--ice-secondary);
  box-shadow: 0 16px 32px rgba(201, 168, 76, 0.2), var(--ice-shadow-xl);
}

/* Header Ticket Bar */
.ice-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px dashed rgba(201, 168, 76, 0.25);
}

.ice-cinema-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ice-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ice-cinema-tag svg {
  width: 14px;
  height: 14px;
  color: var(--ice-secondary);
}

.ice-price-badge {
  background: rgba(201, 168, 76, 0.15);
  color: var(--ice-secondary);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--ice-radius-md);
  border: 1px solid rgba(201, 168, 76, 0.3);
}

/* Poster Container */
.ice-card-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

.ice-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ice-transition);
}

.ice-card:hover .ice-poster-img {
  transform: scale(1.06);
}

.ice-poster-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--ice-text-muted);
  opacity: 0.4;
}

.ice-poster-placeholder svg {
  width: 48px;
  height: 48px;
}

/* Body Content */
.ice-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ice-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.ice-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ice-teal);
  font-weight: 600;
}

.ice-meta-row svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.ice-card-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 12px 0;
}

.ice-card-title a {
  color: var(--ice-text-main);
  text-decoration: none;
  transition: color var(--ice-transition);
}

.ice-card-title a:hover {
  color: var(--ice-secondary);
}

.ice-card-synopsis {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ice-text-muted);
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ice-card-footer {
  margin-top: auto;
  border-top: 1px solid var(--ice-border-color);
  padding-top: 18px;
}

.ice-ticket-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(201, 168, 76, 0.1);
  color: var(--ice-secondary);
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: var(--ice-radius-md);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--ice-transition);
}

.ice-ticket-btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--ice-transition);
}

.ice-ticket-btn:hover {
  background: var(--ice-secondary);
  color: var(--ice-bg-primary);
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.3);
}

.ice-ticket-btn:hover svg {
  transform: translateX(4px);
}

/* Pagination */
.ice-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2rem;
}

.ice-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ice-text-main);
  text-decoration: none;
  border: 1px solid var(--ice-border-color);
  border-radius: var(--ice-radius-md);
  background: var(--ice-overlay);
}

.ice-pagination .page-numbers.current {
  background: var(--ice-secondary);
  color: var(--ice-bg-primary);
  border-color: var(--ice-secondary);
}

.ice-no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--ice-text-muted);
}

/* Responsive collapse to 1 column on tablet and mobile */
@media (max-width: 868px) {
  .ice-grid {
    grid-template-columns: 1fr;
  }
}
