/* Global Lottery and Language Selectors */

.global-controls {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 0;
}

/* Lottery Selector */
.lottery-selector {
  position: relative;
  flex: 1;
  max-width: 350px;
}

.lottery-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.95rem;
}

.lottery-btn:hover {
  border-color: var(--lottery-primary, #667eea);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.lottery-flag {
  font-size: 1.5rem;
  line-height: 1;
}

.lottery-name {
  flex: 1;
  text-align: left;
  font-weight: 700;
}

.lottery-arrow {
  color: #999;
  transition: transform 0.2s;
  font-size: 0.8rem;
}

.lottery-btn.active .lottery-arrow {
  transform: rotate(180deg);
}

.lottery-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 1000;
}

.lottery-dropdown.show,
.lottery-dropdown.active {
  max-height: 500px;
  overflow-y: auto;
}

.lottery-dropdown-header {
  padding: 16px;
  border-bottom: 2px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.lottery-search {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Noto Sans KR', sans-serif;
}

.lottery-search:focus {
  outline: none;
  border-color: var(--lottery-primary, #667eea);
}

.lottery-dropdown-body {
  padding: 8px;
}

.lottery-country-group {
  margin-bottom: 12px;
}

.lottery-country-header {
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lottery-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
  font-family: 'Noto Sans KR', sans-serif;
  text-align: left;
}

.lottery-option:hover {
  background: #f8f9fa;
}

.lottery-option.active {
  background: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
  border-left: 4px solid var(--lottery-primary, #667eea);
}

.lottery-option-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.lottery-option-desc {
  font-size: 0.8rem;
  color: #999;
}

/* Language Selector */
.language-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans KR', sans-serif;
}

.lang-btn:hover {
  border-color: var(--lottery-secondary, #00b894);
}

.lang-icon {
  font-size: 1.3rem;
}

.lang-code {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 30px;
  text-transform: uppercase;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 1000;
  min-width: 180px;
}

.lang-dropdown.show,
.lang-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lottery-option.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lottery-option-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f3f5;
  color: #666;
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Noto Sans KR', sans-serif;
}

.lang-option:hover {
  background: #f8f9fa;
}

.lang-option.active {
  background: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
}

.lang-flag {
  font-size: 1.5rem;
}

.lang-name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .global-controls {
    flex-direction: column;
    gap: 12px;
  }

  .lottery-selector {
    max-width: 100%;
  }

  .language-selector {
    width: 100%;
  }

  .lang-btn {
    width: 100%;
    justify-content: center;
  }

  .lang-dropdown {
    right: auto;
    left: 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .lottery-btn,
  .lang-btn {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .lottery-dropdown.show {
    max-height: 400px;
  }
}
