/* Phone Input - Unified */
.phone-input-container {
  display: flex;
  height: 50px;
  overflow: hidden;
  border: 1px solid var(--tertiary-color);
  transition: all 0.3s ease;
  background: var(--shadow-color);
  border-radius: 6px;
}

.phone-input-container .country-code-select,
.phone-input-container .country-code-mobile-trigger {
  border: none;
  background: var(--shadow-dark);
  border-right: 1px solid var(--tertiary-color);
  cursor: pointer;
  transition: background-color 0.3s ease;
  height: 100%;
  color: var(--white);
}

.phone-input-container .country-code-select {
  padding: 0 28px 0 12px;
  font-size: 1rem;
  min-width: 85px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}

.phone-input-container .country-code-mobile-trigger {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
}

.phone-input-container .country-code-select:focus,
.phone-input_container .country-code-mobile-trigger:focus {
  background-color: var(--tertiary-dark);
  outline: none;
}

.phone-input-container .country-code-mobile-trigger .selected-code {
  font-size: 0.8rem;
  color: var(--secondary-light);
}

.phone-input-container .country-code-mobile-trigger .dropdown-icon {
  width: 10px;
  height: 10px;
  color: var(--secondary-light);
}

.phone-input-container .phone-number {
  border: none !important;
  flex: 1;
  outline: none;
  box-shadow: none !important;
  margin: 0;
  padding: 0 15px;
  font-size: 0.9rem;
  height: 100%;
  background: transparent;
  color: var(--white);
}

/*===LANG CODES===*/
/*================*/

.modern-phone-field {
  position: relative;
  width: 100%;
}

.phone-input-container {
  display: flex;
  border: 1px solid var(--tertiary-color);
  border-radius: 6px;
  background: var(--shadow-color);
  transition: all 0.3s ease;
}

.phone-input-container:focus-within {
  border-color: var(--primary-color);
  background-color: var(--tertiary-dark);
  box-shadow: 0 0 0 3px rgba(0, 128, 129, 0.4);
}

.country-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 12px 10px;
  background: var(--shadow-dark);
  border: none;
  border-right: 1px solid var(--tertiary-color);
  cursor: pointer;
  transition: background 0.2s;
  min-width: 100px;
}

.country-button:hover {
  background: var(--tertiary-dark);
}

.flag {
  font-size: 18px;
}

.code {
  font-weight: 500;
  color: var(--white) !important;
  font-size: 14px;
}

.arrow {
  width: 12px;
  height: 12px;
  fill: var(--secondary-light);
  transition: transform 0.2s;
}

.country-button.active .arrow {
  transform: rotate(180deg);
}

.phone-input {
  width: calc(100% - 36px);
  border: none;
  padding: 12px 10px 12px 5px;
  font-size: 16px;
  outline: none;
  background: transparent;
  color: var(--white) !important;
}

.phone-input::placeholder {
  color: var(--secondary-color) !important;
}

.country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--shadow-dark);
  border: 1px solid var(--tertiary-color);
  border-radius: 8px;
  box-shadow: 0 8px 16px var(--shadow-medium);
  z-index: 1000;
  max-height: 300px;
  margin-top: 4px;
  display: none;
}

.country-dropdown.open {
  display: block;
}

.country-search {
  width: calc(100% - 32px);
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--tertiary-color);
  outline: none;
  font-size: 14px;
  background: var(--shadow-color);
  color: var(--white);
}

.country-search:focus {
  background: var(--tertiary-dark);
  border-bottom-color: var(--primary-color);
}

.country-list {
  max-height: 240px;
  overflow-y: auto;
}

.country-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.country-item:hover {
  background: var(--tertiary-dark);
}

.country-search::placeholder {
  color: var(--secondary-color) !important;
}

.country-item .name {
  flex: 1;
  font-size: 14px;
  color: var(--white) !important;
}

.country-item .code {
  color: var(--secondary-light) !important;
}

/* Placeholders */
.offer-section .phone-input::placeholder,
.visit-section .phone-input::placeholder {
  color: var(--secondary-color) !important;
}

@media (max-width: 768px) {
  .country-dropdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 400px;
    max-height: 70vh;
    background: var(--shadow-dark);
    border: 1px solid var(--tertiary-color);
  }
}
