/* Phone field with country-code dropdown (flags) */
.phone-field {
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    background-color: #f8fafc;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-field > p {
    display: flex;
    align-items: stretch;
    margin: 0;
}

.phone-field > p:first-child {
    flex: 0 0 auto;
}

.phone-field > p:last-child {
    flex: 1 1 auto;
    min-width: 0;
}

.phone-code-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: none;
    border-right: 1.5px solid #e2e8f0;
    border-radius: 16px 0 0 16px;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.phone-code-toggle .phone-code-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.phone-code-toggle::after {
    content: "";
    margin-left: 2px;
    border: 4px solid transparent;
    border-top-color: #64748b;
    margin-top: 3px;
}

.phone-code-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 280px;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    z-index: 50;
    padding: 8px;
    box-sizing: border-box;
}

.phone-code-dropdown.open {
    display: block;
}

.phone-code-search {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    margin-bottom: 6px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.phone-code-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.phone-code-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1e293b;
}

.phone-code-list li:hover {
    background: #f1f5f9;
}

.phone-code-list .cc-name {
    flex: 1;
}

.phone-code-list .cc-dial {
    color: #64748b;
}

.modern-contact-form .phone-field input[type="tel"] {
    border: none;
    background: transparent;
    border-radius: 0;
}

.modern-contact-form .phone-field input[type="tel"]:focus {
    box-shadow: none;
    transform: none;
}

.phone-field:focus-within {
    background-color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
