.bi {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: -0.125em;
    fill: currentColor;
}

.field-error { border-color: #ef4444 !important; }
.field-success { border-color: #22c55e !important; }
.phone-input-box.field-error { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08) !important; }
.phone-input-box.field-success { border-color: #22c55e !important; }

.error-text {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    line-height: 1.4;
}
.error-text.visible { display: flex; }

.module-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    min-height: 44px;
    border-radius: 9999px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.module-chip:hover { border-color: #1754cf; background: #eff6ff; color: #1754cf; }
.module-chip.selected { border-color: #1754cf; background: #1754cf; color: white; }
.module-chip.selected .chip-check { display: inline-flex; }
.chip-check { display: none; }

.form-progress { height: 3px; background: #e2e8f0; border-radius: 9999px; overflow: hidden; }
.form-progress-bar { height: 100%; background: linear-gradient(90deg, #1754cf, #14b8a6); border-radius: 9999px; transition: width 0.4s ease; }

.phone-field-wrapper { position: relative; }
#phoneNumber {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    background: transparent;
}
#phoneNumber:focus {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}
.phone-input-box {
    border: 1.5px solid #e2e8f0;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.phone-input-box:focus-within:not(.field-error) {
    border-color: #1754cf;
    box-shadow: 0 0 0 3px rgba(23, 84, 207, 0.1);
}
.phone-code-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    border-right: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 12px 0 0 12px;
    min-width: 95px;
    flex-shrink: 0;
}
.phone-code-btn:hover { background: #f1f5f9; }
.phone-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 320px;
    max-height: 300px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    z-index: 100;
    overflow: hidden;
}
.phone-dropdown.open { display: block; }
.phone-dropdown-search {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    outline: none;
    color: #334155;
}
.phone-dropdown-list {
    max-height: 248px;
    overflow-y: auto;
}
.phone-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
}
.phone-option:hover { background: #f1f5f9; }
.phone-option.selected { background: #eff6ff; color: #1754cf; font-weight: 600; }
.phone-option .flag img, .phone-code-btn .flag img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
}
.phone-option .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-option .dial { color: #64748b; font-weight: 500; flex-shrink: 0; }
.phone-option.hidden { display: none; }

.module-chip input { position: absolute; opacity: 0; pointer-events: none; }
